blob: 586dd2375c9b4c751ca60779c196256e645ffb6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
From 4eeeaec775e190cf3f5885d7c6717acebd0201a8 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 11 Aug 2016 17:13:51 +0300
Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under
OpenEmbedded build system
This requires setting a few environment variables so that the transient
binary is build and linked correctly, and disabling the tweaks to RUN
variable from gtkdoc.py script so that our qemu wrapper is taken into use.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
Source/PlatformGTK.cmake | 2 +-
Tools/gtk/gtkdoc.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake
index af4d2e3..b7b93c7 100644
--- a/Source/PlatformGTK.cmake
+++ b/Source/PlatformGTK.cmake
@@ -25,7 +25,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
DEPENDS ${DocumentationDependencies}
- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} LD=${CMAKE_C_COMPILER} LDFLAGS=${CMAKE_C_LINK_FLAGS} RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper GIR_EXTRA_LIBS_PATH=${CMAKE_BINARY_DIR}/lib ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
COMMAND touch ${_stamp_name}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py
index 4c8237b..c0205f0 100644
--- a/Tools/gtk/gtkdoc.py
+++ b/Tools/gtk/gtkdoc.py
@@ -318,9 +318,9 @@ class GTKDoc(object):
additional_ldflags = '%s %s' % (additional_ldflags, arg)
ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags
current_ld_library_path = env.get('LD_LIBRARY_PATH')
- if current_ld_library_path:
+ if current_ld_library_path and 'RUN' not in env:
env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path)
- else:
+ elif 'RUN' not in env:
env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path
if ldflags:
--
2.8.1
|