summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-24 15:20:18 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2022-02-24 15:20:18 +0100
commit1c484316591d44560bb179ad1abc84b487b61ab6 (patch)
tree647e76f68ad3c367b4d12e6d1b0595ba35fd9343
parent94ab1e5359f3bd9eb8204aadea88e08f52a291d8 (diff)
downloadglibmm-1c484316591d44560bb179ad1abc84b487b61ab6.tar.gz
meson.build: Check if Perl is required for building documentation
New versions of mm-common use the Python scripts doc_postprocess.py and doc_install.py instead of the Perl scripts doc-postprocess.pl and doc-install.pl when documentation is built.
-rw-r--r--meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 2d1ed487..2b9c186c 100644
--- a/meson.build
+++ b/meson.build
@@ -140,7 +140,6 @@ if maintainer_mode and not mm_common_get.found()
mm_common_get = find_program('mm-common-get', required: true)
endif
m4 = find_program('m4', required: maintainer_mode) # Used by gmmproc
-perl = find_program('perl', required: maintainer_mode or build_documentation)
doxygen = find_program('doxygen', required: build_documentation)
dot = find_program('dot', required: build_documentation) # Used by Doxygen
xsltproc = find_program('xsltproc', required: build_documentation)
@@ -173,6 +172,21 @@ sys.exit(os.path.isfile("@0@"))
endif
endif
+# Check if perl is required and available.
+doc_perl_prop = run_command(
+ python3, doc_reference_py, 'get_script_property',
+ '', # MMDOCTOOLDIR is not used
+ 'requires_perl',
+ check: false,
+)
+doc_requires_perl = true
+if doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false'
+ doc_requires_perl = false
+endif
+
+perl = find_program('perl', required: maintainer_mode or \
+ (build_documentation and doc_requires_perl))
+
# glibmm's own script files.
glibmm_script_dir = project_source_root / 'tools' / 'build_scripts'
handle_built_files_py = glibmm_script_dir / 'handle-built-files.py'