summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-08-17 15:49:28 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-08-17 15:49:28 +0200
commit58bd5a17206d54e5bcdf55a5b857391ef27725d4 (patch)
treeb249c28d5198f7706b0ac86a052a18e4b8cd5652
parent1c49000db5b70b10c43af25c334a7f3006ea768d (diff)
downloadsigc++-58bd5a17206d54e5bcdf55a5b857391ef27725d4.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.build12
-rw-r--r--untracked/README4
2 files changed, 13 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 27d422a..281e901 100644
--- a/meson.build
+++ b/meson.build
@@ -120,7 +120,6 @@ if maintainer_mode and not mm_common_get.found()
mm_common_get = find_program('mm-common-get', required: true)
endif
-perl = find_program('perl', required: 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)
@@ -148,6 +147,17 @@ sys.exit(os.path.isfile("@0@"))
endif
endif
+# Check if perl is required and available.
+# Done now, when the doc_reference script is available.
+doc_perl_prop = run_command(
+ python3, doc_reference, 'get_script_property',
+ '', # MMDOCTOOLDIR is not used
+ 'requires_perl')
+if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
+ # Perl is required, if documentation shall be built.
+ perl = find_program('perl', required: build_documentation)
+endif
+
# Set compiler warnings.
warning_flags = []
if warning_level == 'min'
diff --git a/untracked/README b/untracked/README
index 31a12d4..dfefb62 100644
--- a/untracked/README
+++ b/untracked/README
@@ -15,8 +15,8 @@ or the tarball is created with Meson.
1. Files copied by mm-common-get
--------------------------------
-untracked/docs/docs/doc-install.pl
- doc-postprocess.pl
+untracked/docs/docs/doc_install.py or doc-install.pl
+ doc_postprocess.py or doc-postprocess.pl
doxygen-extra.css
tagfile-to-devhelp2.xsl
untracked/build_scripts/dist-build-scripts.py