mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
doc: store path to dynamic library in plugin configuration
This can then be used by the pre-commit hook to avoid rebuilding complete plugin caches to check a change, thus minimizing the potential diff and making analysis of completely-unrelated cache diffs much less likely. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8231>
This commit is contained in:
parent
7b4e6e67d3
commit
c276f5daca
2 changed files with 25 additions and 0 deletions
|
@ -48,6 +48,7 @@ class GstPluginsHotdocConfGen:
|
||||||
parser.add_argument('--include_paths', nargs='*', default=[])
|
parser.add_argument('--include_paths', nargs='*', default=[])
|
||||||
parser.add_argument('--gst_c_source_filters', nargs='*', default=[])
|
parser.add_argument('--gst_c_source_filters', nargs='*', default=[])
|
||||||
parser.add_argument('--gst_c_source_file', type=P)
|
parser.add_argument('--gst_c_source_file', type=P)
|
||||||
|
parser.add_argument('--gst_plugin_libraries_file', type=P)
|
||||||
parser.add_argument('--output', type=P)
|
parser.add_argument('--output', type=P)
|
||||||
|
|
||||||
parser.parse_args(namespace=self, args=sys.argv[2:])
|
parser.parse_args(namespace=self, args=sys.argv[2:])
|
||||||
|
@ -61,6 +62,12 @@ class GstPluginsHotdocConfGen:
|
||||||
else:
|
else:
|
||||||
gst_c_source_map = {}
|
gst_c_source_map = {}
|
||||||
|
|
||||||
|
if self.gst_plugin_libraries_file is not None:
|
||||||
|
with self.gst_plugin_libraries_file.open() as fd:
|
||||||
|
gst_plugin_libraries_map = json.load(fd)
|
||||||
|
else:
|
||||||
|
gst_plugin_libraries_map = {}
|
||||||
|
|
||||||
with self.gst_cache_file.open() as fd:
|
with self.gst_cache_file.open() as fd:
|
||||||
all_plugins = json.load(fd)
|
all_plugins = json.load(fd)
|
||||||
|
|
||||||
|
@ -91,6 +98,7 @@ class GstPluginsHotdocConfGen:
|
||||||
'gst_c_source_filters': [str(s) for s in self.gst_c_source_filters],
|
'gst_c_source_filters': [str(s) for s in self.gst_c_source_filters],
|
||||||
'include_paths': self.include_paths,
|
'include_paths': self.include_paths,
|
||||||
'gst_order_generated_subpages': True,
|
'gst_order_generated_subpages': True,
|
||||||
|
'gst_plugin_library': gst_plugin_libraries_map.get(plugin_name),
|
||||||
}, f, indent=4)
|
}, f, indent=4)
|
||||||
|
|
||||||
if self.output is not None:
|
if self.output is not None:
|
||||||
|
|
|
@ -168,6 +168,22 @@ cdir = meson.current_source_dir()
|
||||||
|
|
||||||
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
doc_source_file = configure_file(output: 'doc_sources.json', configuration: plugin_sources, output_format: 'json')
|
||||||
|
|
||||||
|
plugin_libraries = {}
|
||||||
|
|
||||||
|
foreach plugin: plugins
|
||||||
|
if plugin.name().startswith('gst')
|
||||||
|
plugin_name = plugin.name().substring(3)
|
||||||
|
else
|
||||||
|
plugin_name = plugin.name()
|
||||||
|
endif
|
||||||
|
|
||||||
|
plugin_libraries += {
|
||||||
|
plugin_name: plugin.full_path()
|
||||||
|
}
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
doc_plugin_libs_file = configure_file(output: 'doc_plugin_libs.json', configuration: plugin_libraries, output_format: 'json')
|
||||||
|
|
||||||
plugin_hotdoc_configs = custom_target(
|
plugin_hotdoc_configs = custom_target(
|
||||||
'build-hotdoc-configs',
|
'build-hotdoc-configs',
|
||||||
command: [
|
command: [
|
||||||
|
@ -179,6 +195,7 @@ plugin_hotdoc_configs = custom_target(
|
||||||
'--index', cdir / 'plugins/index.md',
|
'--index', cdir / 'plugins/index.md',
|
||||||
'--gst_index', cdir / 'plugins/index.md',
|
'--gst_index', cdir / 'plugins/index.md',
|
||||||
'--gst_c_source_file', doc_source_file,
|
'--gst_c_source_file', doc_source_file,
|
||||||
|
'--gst_plugin_libraries_file', doc_plugin_libs_file,
|
||||||
'--gst_c_sources',
|
'--gst_c_sources',
|
||||||
cdir / '../plugins/*/*.c',
|
cdir / '../plugins/*/*.c',
|
||||||
cdir / '../plugins/*/*.h',
|
cdir / '../plugins/*/*.h',
|
||||||
|
|
Loading…
Reference in a new issue