From 816710d17c59ee197d171d359a9ed61fd3c9b85c Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 15 May 2019 09:23:06 -0400 Subject: [PATCH] docs: Use the MESON_BUILD_ROOT env variable in the plugins cache generator --- docs/gst-plugins-doc-cache-generator.py | 4 ++-- docs/meson.build | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/gst-plugins-doc-cache-generator.py b/docs/gst-plugins-doc-cache-generator.py index d1509e6235..11d7d52e0e 100755 --- a/docs/gst-plugins-doc-cache-generator.py +++ b/docs/gst-plugins-doc-cache-generator.py @@ -36,7 +36,6 @@ except ImportError: # python <3.3 # make it happen. For properties, the best way is to use th # GST_PARAM_DOC_SHOW_DEFAULT flag. UNSTABLE_VALUE = "unstable-values" -BUILD_ROOT = "@BUILD_ROOT@" def dict_recursive_update(d, u): @@ -76,6 +75,7 @@ def test_unstable_values(): if __name__ == "__main__": cache_filename = sys.argv[1] output_filename = sys.argv[2] + build_root = os.environ.get('MESON_BUILD_ROOT', '') subenv = os.environ.copy() cache = {} @@ -93,7 +93,7 @@ if __name__ == "__main__": gst_plugins_paths.append(os.path.dirname(plugin_path)) try: - with open(os.path.join(BUILD_ROOT, 'GstPluginsPath.json'), newline='\n') as f: + with open(os.path.join(build_root, 'GstPluginsPath.json'), newline='\n') as f: plugin_paths = os.pathsep.join(json.load(f)) except FileNotFoundError: plugin_paths = "" diff --git a/docs/meson.build b/docs/meson.build index 2e7827844c..584bbf1942 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -18,16 +18,11 @@ hotdoc_plugin_scanner = executable('gst-hotdoc-plugins-scanner', install: true, ) -conf = configuration_data() -# We pass the build root so the doc cache generator can try -# to find GstPluginsPath.json to set GST_PLUGIN_PATH and -# thus handle plugins dependencies. -conf.set('BUILD_ROOT', meson.build_root()) configure_file( input: 'gst-plugins-doc-cache-generator.py', output: 'gst-plugins-doc-cache-generator', install_dir: helpers_install_dir, - configuration: conf + copy: true ) plugins_cache_generator = find_program(join_paths(meson.current_build_dir(), 'gst-plugins-doc-cache-generator'))