Skip to content

Commit 58bd5a1

Browse files
committed
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.
1 parent 1c49000 commit 58bd5a1

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

meson.build

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ if maintainer_mode and not mm_common_get.found()
120120
mm_common_get = find_program('mm-common-get', required: true)
121121
endif
122122

123-
perl = find_program('perl', required: build_documentation)
124123
doxygen = find_program('doxygen', required: build_documentation)
125124
dot = find_program('dot', required: build_documentation) # Used by Doxygen
126125
xsltproc = find_program('xsltproc', required: build_documentation)
@@ -148,6 +147,17 @@ sys.exit(os.path.isfile("@0@"))
148147
endif
149148
endif
150149

150+
# Check if perl is required and available.
151+
# Done now, when the doc_reference script is available.
152+
doc_perl_prop = run_command(
153+
python3, doc_reference, 'get_script_property',
154+
'', # MMDOCTOOLDIR is not used
155+
'requires_perl')
156+
if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
157+
# Perl is required, if documentation shall be built.
158+
perl = find_program('perl', required: build_documentation)
159+
endif
160+
151161
# Set compiler warnings.
152162
warning_flags = []
153163
if warning_level == 'min'

untracked/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ or the tarball is created with Meson.
1515

1616
1. Files copied by mm-common-get
1717
--------------------------------
18-
untracked/docs/docs/doc-install.pl
19-
doc-postprocess.pl
18+
untracked/docs/docs/doc_install.py or doc-install.pl
19+
doc_postprocess.py or doc-postprocess.pl
2020
doxygen-extra.css
2121
tagfile-to-devhelp2.xsl
2222
untracked/build_scripts/dist-build-scripts.py

0 commit comments

Comments
 (0)