summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-12-14 12:50:48 +0100
committerThomas Haller <thaller@redhat.com>2017-12-14 15:19:01 +0100
commit48d4cda9d498b7e04a76d7ca78e589f206334a47 (patch)
treeddbd2011e7a8a6beed4ca9c21946ce2a9b8eed5e
parent9fc990e8a99bde7178e5c8076383b6e0ca7d7a45 (diff)
build: fix targets generated by generate-settings-docs.py
generate-settings-docs.py script is used to generate the `nm-settings-docs.xml` and `nm-property-docs.xml` files. However, to generate these files properly, the path where `libnm` shared library is built must be passed to the script. This patch uses the recently added `--lib-path` parameter to pass the `libnm`'s built directory, which allows the proper generation of the files in meson. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00045.html
-rw-r--r--libnm/meson.build39
1 files changed, 4 insertions, 35 deletions
diff --git a/libnm/meson.build b/libnm/meson.build
index 6abfaf580a..3541832a5c 100644
--- a/libnm/meson.build
+++ b/libnm/meson.build
@@ -259,9 +259,6 @@ if enable_introspection
)
endif
- # FIXME: uses the following variables
- # GI_TYPELIB_PATH=$(abs_builddir)/libnm$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH};',
- # LD_LIBRARY_PATH=$(abs_builddir)/libnm/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH};',
generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py')
name = 'nm-property-docs.xml'
@@ -269,46 +266,18 @@ if enable_introspection
name,
input: libnm_gir[0],
output: name,
- command: [generate_setting_docs, '--gir', '@INPUT@', '--output', '@OUTPUT@']
+ command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'],
+ depends: libnm
)
- # FIXME: the makefile command
- '''
- # When the python scripts loads libnm and the address sanitizers is
- # enabled, we must LD_PRELOAD libasan otherwise it will complain that
- # it was not loaded as initial library.
- 'nm-property-docs.xml: libnm/generate-setting-docs.py $(libnm_docs_sources) | libnm/NM-1.0.gir libnm/NM-1.0.typelib libnm/libnm.la
- $(AM_V_GEN)',
- export GI_TYPELIB_PATH=$(abs_builddir)/libnm$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH};',
- export LD_LIBRARY_PATH=$(abs_builddir)/libnm/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH};',
- $(call set_sanitizer_env,$(abs_builddir)/libnm/.libs/libnm.so);',
- "$(PYTHON)"',
- $(srcdir)/libnm/generate-setting-docs.py',
- --gir $(builddir)/libnm/NM-1.0.gir',
- --output $@
- '''
-
name = 'nm-settings-docs.xml'
nm_settings_docs = custom_target(
name,
input: libnm_gir[0],
output: name,
- command: [generate_setting_docs, '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@']
+ command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'],
+ depends: libnm
)
-
- # FIXME: the makefile command
- '''
- 'nm-settings-docs.xml: libnm/generate-setting-docs.py libnm/nm-settings-docs-overrides.xml $(libnm_docs_sources) | libnm/NM-1.0.gir libnm/NM-1.0.typelib libnm/libnm.la
- $(AM_V_GEN)',
- export GI_TYPELIB_PATH=$(abs_builddir)/libnm$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH};',
- export LD_LIBRARY_PATH=$(abs_builddir)/libnm/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH};',
- $(call set_sanitizer_env,$(abs_builddir)/libnm/.libs/libnm.so);',
- "$(PYTHON)"',
- $(srcdir)/libnm/generate-setting-docs.py',
- --gir $(builddir)/libnm/NM-1.0.gir',
- --overrides $(word 2,$^)',
- --output $@
- '''
endif
if enable_tests