diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-08-18 08:30:30 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-08-18 08:35:37 +0200 |
commit | ec5f5d5e940e2e798f7df3c50d55129a797e1d41 (patch) | |
tree | b39f7b935d069938f6dc503e4a03c8e10949acf3 | |
parent | a1612e796554207544d30e298d6a57834b335c37 (diff) |
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.build | 13 | ||||
-rw-r--r-- | untracked/README | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 8e132de..a8435da 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 -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) @@ -168,7 +167,7 @@ dist_changelog_py = script_dir / 'dist-changelog.py' dist_build_scripts_py = script_dir / 'dist-build-scripts.py' if maintainer_mode - # Copy files to untracked/build_scripts and untracked/docs/docs. + # Copy files to untracked/build_scripts and untracked/docs. run_command(mm_common_get, '--force', script_dir, project_source_root / 'untracked' / 'docs') else @@ -184,6 +183,16 @@ 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') +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 b6d2cc7..77934a7 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/doc-install.pl - doc-postprocess.pl +untracked/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 |