meson: Add a target to regenerate doc caches for all subprojects

Fixes https://gitlab.freedesktop.org/gstreamer/gst-docs/issues/36
This commit is contained in:
Thibault Saunier 2019-05-16 09:26:47 -04:00
parent 802e18519b
commit 2c50c067d5

View file

@ -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)