docs: explicitly declare gir build dependencies

As the path to the gir file is passed to hotdoc.generate_doc() and
not the build target itself, meson doesn't know about the dependency.

In turn, as the CI doesn't build everything before building the
documentation target, some gir files might not exist, for instance
in the case of gst-rtsp-server, causing the output documentation to
be empty.

The error occurred silently because hotdoc accepts wildcards for
*-sources arguments, thus it won't warn about a missing gir file as
it is legitimate for glob matching to resolve to nothing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3686>
This commit is contained in:
Mathieu Duponchelle 2023-01-04 21:37:55 +01:00 committed by GStreamer Marge Bot
parent fa2b98f957
commit 2f020013e6
6 changed files with 7 additions and 0 deletions

View file

@ -72,4 +72,5 @@ libs_doc = [hotdoc.generate_doc('gst-devtools',
gi_sources: [validate_gir[0].full_path()],
disable_incremental_build: true,
dependencies : [validate_dep],
depends: validate_gir[0],
)]

View file

@ -108,6 +108,7 @@ libs_doc = [hotdoc.generate_doc('gst-editing-services',
gi_order_generated_subpages: true,
dependencies: [ges_dep],
disable_incremental_build: true,
depends: ges_gir[0],
)]
plugins_doc = []

View file

@ -198,6 +198,7 @@ foreach lib_def: libs
dependencies: [lib, gir],
c_flags: '-DGST_USE_UNSTABLE_API',
install: false,
depends: gir[0],
)]
endif
else

View file

@ -168,6 +168,7 @@ foreach lib: libs
gi_order_generated_subpages: true,
dependencies: deps,
install: false,
depends: gir[0],
)]
endforeach

View file

@ -91,6 +91,7 @@ libs_doc = [hotdoc.generate_doc('gst-rtsp-server',
gi_index: 'index.md',
gi_smart_index: true,
gi_order_generated_subpages: true,
depends: rtsp_server_gir[0],
)]
plugins_doc = [hotdoc.generate_doc('rtspclientsink',

View file

@ -132,6 +132,7 @@ libs_doc = [hotdoc.generate_doc('gstreamer',
gi_c_source_roots: [join_paths(meson.current_source_dir(), '../gst/'), ],
dependencies: [gst_dep, gmodule_dep],
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
depends: gst_gir[0],
)]
libs = [
@ -158,6 +159,7 @@ foreach lib: libs
gi_order_generated_subpages: true,
dependencies: deps,
install: false,
depends: gir[0],
)]
endforeach