From 2c50c067d52a7b0b922a161eecf85eda1bf796c9 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 16 May 2019 09:26:47 -0400 Subject: [PATCH] meson: Add a target to regenerate doc caches for all subprojects Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/issues/36 --- meson.build | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 632ee13fbf..06c06d3d9d 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,7 @@ pathsep = host_machine.system() == 'windows' ? ';' : ':' subproject('orc', required: get_option('orc')) subprojects_names = [] +plugins_doc_caches = [] all_plugins = '' foreach sp : subprojects project_name = sp[0] @@ -83,7 +84,11 @@ foreach sp : subprojects endif if subproj.found() and build_infos.has_key('build-hotdoc', default: false) - foreach plugin: subproj.get_variable('plugins') + plugins = subproj.get_variable('plugins') + if plugins.length() > 0 + plugins_doc_caches += [subproj.get_variable('plugins_doc_dep')] + endif + foreach plugin: plugins all_plugins += pathsep + plugin.full_path() endforeach if documented_projects != '' @@ -99,6 +104,13 @@ foreach sp : subprojects endif endforeach +plugins_doc_dep = custom_target('plugins-doc-cache', + command: [python3, '-c', 'print("Built all doc caches")'], + input: plugins_doc_caches, + output: 'plugins_doc_caches', + capture: true, +) + foreach custom_subproj: get_option('custom_subprojects').split(',') if custom_subproj != '' message ('Adding custom subproject ' + custom_subproj)