docs: explicitly declare gir build dependencies
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 4 Jan 2023 20:37:55 +0000 (21:37 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 6 Jan 2023 22:50:57 +0000 (22:50 +0000)
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>

subprojects/gst-devtools/docs/meson.build
subprojects/gst-editing-services/docs/meson.build
subprojects/gst-plugins-bad/docs/meson.build
subprojects/gst-plugins-base/docs/meson.build
subprojects/gst-rtsp-server/docs/meson.build
subprojects/gstreamer/docs/meson.build

index 560253e..bff3328 100644 (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],
 )]
index b2a1c7a..2cee911 100644 (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 = []
index 9666e01..080419f 100644 (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
index 7626def..f799db9 100644 (file)
@@ -168,6 +168,7 @@ foreach lib: libs
       gi_order_generated_subpages: true,
       dependencies: deps,
       install: false,
+      depends: gir[0],
   )]
 endforeach
 
index 0505a17..b692cd0 100644 (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',
index 3907d25..4dad0d3 100644 (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