diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-26 18:14:37 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-28 20:38:52 +0200 |
commit | 21840f532128b7104d6efffa14ce6a66130e2c3e (patch) | |
tree | c8d1a16d9014791bede6847ffbf39339b43a5da4 /libnm/meson.build | |
parent | 0eafdcd57241b6e7b7210191408b3911e0070e45 (diff) | |
download | NetworkManager-21840f532128b7104d6efffa14ce6a66130e2c3e.tar.gz |
meson: generate-setting-docs.py environment correctly
It's ugly, because meson doesnt' seem to provide any useful facilities for
dealing with environment variables. Not my fault.
Diffstat (limited to 'libnm/meson.build')
-rw-r--r-- | libnm/meson.build | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libnm/meson.build b/libnm/meson.build index b5c834ce5b..ac0b7dac1e 100644 --- a/libnm/meson.build +++ b/libnm/meson.build @@ -239,12 +239,30 @@ if enable_introspection generate_setting_docs = join_paths(meson.current_source_dir(), 'generate-setting-docs.py') + gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout() + if gi_typelib_path != '' + gi_typelib_path = ':' + gi_typelib_path + endif + gi_typelib_path = meson.current_build_dir() + gi_typelib_path + + ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH').stdout() + if ld_library_path != '' + ld_library_path = ':' + ld_library_path + endif + ld_library_path = meson.current_build_dir() + ld_library_path + + generate_setting_docs_env = [ + 'env', '-i', + 'GI_TYPELIB_PATH=' + gi_typelib_path, + 'LD_LIBRARY_PATH=' + ld_library_path + ] + name = 'nm-property-docs.xml' nm_property_docs = custom_target( name, input: libnm_gir[0], output: name, - command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], + command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--output', '@OUTPUT@'], depends: libnm ) @@ -253,7 +271,7 @@ if enable_introspection name, input: libnm_gir[0], output: name, - command: [generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'], + command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'], depends: libnm ) endif |