doc: Allow updating the plugins cache for all modules even if hotdoc is not present
authorThibault Saunier <tsaunier@igalia.com>
Wed, 18 Dec 2024 15:27:30 +0000 (12:27 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 20 Dec 2024 20:19:28 +0000 (20:19 +0000)
This was possible for some modules but not all, for no good reason.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8178>

subprojects/gst-editing-services/docs/meson.build
subprojects/gst-libav/docs/meson.build
subprojects/gst-plugins-bad/docs/meson.build
subprojects/gst-plugins-base/docs/meson.build
subprojects/gst-plugins-good/docs/meson.build
subprojects/gst-plugins-ugly/docs/meson.build
subprojects/gst-rtsp-server/docs/meson.build

index 50839ec924ec4daca1119acd0e9fca2b4416d5e2..989ae92f4aab9372375d9e3d0998125153542afc 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -31,7 +27,6 @@ if not build_gir
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
@@ -52,6 +47,9 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -70,6 +68,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index bb744a6ee5251b633db81b8173a65486bf9b5b22..3f2539b7b8efbf44e55311372aa2e1ffe344f14c 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -22,7 +18,6 @@ if static_build
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
@@ -43,6 +38,11 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -65,6 +65,7 @@ hotdoc = import('hotdoc')
 docconf = configuration_data()
 docconf.set('GST_API_VERSION', api_version)
 
+required_hotdoc_extensions = ['gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index ba33b97f64453361c1ea0359f73e3a630f5e9bec..2face66b05a63799e96a5cbd70c70cd9bf263a48 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -30,7 +26,6 @@ if not build_gir
     message('Introspection not built, won\'t build documentation requiring it')
 endif
 
-required_hotdoc_extensions = ['gi-extension', 'c-extension', 'gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
@@ -54,6 +49,11 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -72,6 +72,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gi-extension', 'c-extension', 'gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index 3a24caf4eaba11db80a03edac409b053469d7f69..5a7b1bc402e1e9733030c5f35472263071ab7a6b 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -32,7 +28,6 @@ if not build_gir
 endif
 
 
-required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
@@ -56,6 +51,10 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -74,6 +73,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index 67c58af4fe774cf7c334ba5583b8ad6d97731856..04bacca68a1e8f6bca6a11cb29eba3e3166e9a12 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if static_build
     if get_option('doc').enabled()
         error('Documentation enabled but not supported when building statically.')
@@ -22,7 +18,6 @@ if meson.is_cross_build()
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
@@ -45,6 +40,10 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -63,6 +62,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index 1d726ea81d14e1b0bc5433c1485e5a31fea95a84..e4a28d629c782c7b624a179d4a8eb5cbaabf5a9d 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -22,7 +18,6 @@ if static_build
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gst-extension']
 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
@@ -45,6 +40,10 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -63,6 +62,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()
index d3fc8918e3bc1f8cd961f5ca3f8ec59a97268896..e5eaf563a68662868566e67573e0314c7a5da4df 100644 (file)
@@ -1,9 +1,5 @@
 build_hotdoc = false
 
-if get_option('doc').disabled()
-  subdir_done()
-endif
-
 if meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -31,12 +27,10 @@ if not build_gir
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    required_hotdoc_extensions += ['gst-extension']
     plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
@@ -54,6 +48,10 @@ else
     warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
 endif
 
+if get_option('doc').disabled()
+  subdir_done()
+endif
+
 hotdoc_p = find_program('hotdoc', required: get_option('doc'))
 if not hotdoc_p.found()
     message('Hotdoc not found, not building the documentation')
@@ -72,6 +70,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
 endif
 
 hotdoc = import('hotdoc')
+required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 foreach extension: required_hotdoc_extensions
     if not hotdoc.has_extensions(extension)
         if get_option('doc').enabled()