From e8edaeeb8713bfe28fceab47e2e00da61060b6e4 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 29 Nov 2023 10:26:37 +0000 Subject: [PATCH] build: Rename -Dgtk_doc option to -Ddocumentation Because the documentation is no longer built using gtk-doc. Keep the old option around, but deprecated. Signed-off-by: Philip Withnall Helps: #3037 --- .gitlab-ci.yml | 4 ++-- docs/reference/glib/building.md | 12 ++++-------- docs/reference/glib/meson.build | 2 +- docs/reference/meson.build | 2 +- meson.build | 2 +- meson_options.txt | 8 +++++++- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0415eefc..e740eae01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,7 @@ fedora-x86_64: -Dsystemtap=true -Ddtrace=true -Dinstalled_tests=true - -Dgtk_doc=true + -Ddocumentation=true _build - meson compile -C _build - mkdir -p _coverage @@ -735,7 +735,7 @@ dist-job: - git submodule update --init - for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done - meson subprojects download - - meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build + - meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Ddocumentation=true -Dman=true _build - meson dist -C _build - ninja -C _build glib-doc gobject-doc gio-doc - tar -c -J -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html diff --git a/docs/reference/glib/building.md b/docs/reference/glib/building.md index c2c04021b..450227ab4 100644 --- a/docs/reference/glib/building.md +++ b/docs/reference/glib/building.md @@ -117,7 +117,7 @@ libraries. gobject-introspection against this copy of GLib, then re-building GLib against the new gobject-introspection with `-Dintrospection=enabled`. The GLib API documentation can be built during this second build process if - `-Dgtk_doc=true` is also set. + `-Ddocumentation=true` is also set. ## Extra Configuration Options @@ -142,13 +142,9 @@ configuring the GLib library: Therefore, it may make sense to turn this feature off in some situations. The `-Dbsymbolic_functions=false` option allows to do that. -`-Dgtk_doc=false` and `-Dgtk_doc=true` -: By default, GLib will detect whether the gtk-doc package is installed. - If it is, then it will use it to extract and build the documentation - for the GLib library. These options can be used to explicitly control - whether gtk-doc should be used or not. If it is not used, the - distributed, pre-generated HTML files will be installed instead of - building them on your machine. +`-Ddocumentation=false` and `-Ddocumentation=true` +: By default, GLib will not build documentation for the library and tools. This + option can be used to enable building the documentation. `-Dman=false` and `-Dman=true` : By default, GLib will detect whether `xsltproc` and the necessary DocBook diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 3759c2ba7..303404cf6 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -11,7 +11,7 @@ if get_option('man') endforeach endif -if get_option('gtk_doc') +if get_option('documentation') # GVariant specification is currently standalone rst2html5 = find_program('rst2html5', 'rst2html5.py', required: false) diff --git a/docs/reference/meson.build b/docs/reference/meson.build index e7f3b3f9c..9f52de48d 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -1,4 +1,4 @@ -if get_option('gtk_doc') and enable_gir +if get_option('documentation') and enable_gir gidocgen_dep = dependency('gi-docgen', version: '>= 2023.1', fallback: ['gi-docgen', 'dummy_dep'], required: true) diff --git a/meson.build b/meson.build index b87a95e02..0a51fae99 100644 --- a/meson.build +++ b/meson.build @@ -2638,7 +2638,7 @@ summary({ 'dtrace' : get_option('dtrace'), 'systemtap' : enable_systemtap, 'sysprof' : libsysprof_capture_dep.found(), - 'gtk_doc' : get_option('gtk_doc'), + 'documentation' : get_option('documentation'), 'bsymbolic_functions' : get_option('bsymbolic_functions'), 'force_posix_threads' : get_option('force_posix_threads'), 'tests' : get_option('tests'), diff --git a/meson_options.txt b/meson_options.txt index e448748cd..83ede7fd4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -62,10 +62,16 @@ option('sysprof', value : 'disabled', description : 'include tracing support for sysprof') +option('documentation', + type : 'boolean', + value : false, + description : 'Build API reference and tools documentation') + option('gtk_doc', type : 'boolean', value : false, - description : 'use gtk-doc to build documentation') + description : 'use gtk-doc to build documentation', + deprecated : 'documentation') option('bsymbolic_functions', type : 'boolean',