Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 1 | From 1c7e7a385387d7febf633bbb6d2b99ece523e719 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Thu, 11 Aug 2016 17:13:51 +0300 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 4 | Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under |
| 5 | OpenEmbedded build system |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 6 | |
| 7 | This requires setting a few environment variables so that the transient |
| 8 | binary is build and linked correctly, and disabling the tweaks to RUN |
| 9 | variable from gtkdoc.py script so that our qemu wrapper is taken into use. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [oe-specific] |
| 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 13 | |
| 14 | --- |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 15 | Source/cmake/GtkDoc.cmake | 2 +- |
| 16 | Tools/gtkdoc/gtkdoc.py | 4 ++-- |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 17 | 2 files changed, 3 insertions(+), 3 deletions(-) |
| 18 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 20 | index 18e86448..102c873a 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 21 | --- a/Source/cmake/GtkDoc.cmake |
| 22 | +++ b/Source/cmake/GtkDoc.cmake |
| 23 | @@ -4,7 +4,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | add_custom_command( |
| 25 | OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}" |
| 26 | DEPENDS ${DocumentationDependencies} |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 27 | - COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} |
| 28 | + COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LD=${CMAKE_C_COMPILER}" "LDFLAGS=${CMAKE_C_LINK_FLAGS}" "RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | COMMAND touch ${_stamp_name} |
| 30 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" |
| 31 | VERBATIM |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 32 | diff --git a/Tools/gtkdoc/gtkdoc.py b/Tools/gtkdoc/gtkdoc.py |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 33 | index 054cafa1..416de7d1 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 34 | --- a/Tools/gtkdoc/gtkdoc.py |
| 35 | +++ b/Tools/gtkdoc/gtkdoc.py |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 36 | @@ -320,9 +320,9 @@ class GTKDoc(object): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | additional_ldflags = '%s %s' % (additional_ldflags, arg) |
| 38 | ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags |
| 39 | current_ld_library_path = env.get('LD_LIBRARY_PATH') |
| 40 | - if current_ld_library_path: |
| 41 | + if current_ld_library_path and 'RUN' not in env: |
| 42 | env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path) |
| 43 | - else: |
| 44 | + elif 'RUN' not in env: |
| 45 | env['LD_LIBRARY_PATH'] = self.library_path |
| 46 | |
| 47 | if ldflags: |