Skip to content

Commit 40d7695

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 77ac2a4 commit 40d7695

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

meson.build

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ if maintainer_mode and not mm_common_get.found()
114114
mm_common_get = find_program('mm-common-get', required: true)
115115
endif
116116
m4 = find_program('m4', required: maintainer_mode) # For building C++ code
117-
perl = find_program('perl', required: build_documentation)
118117
doxygen = find_program('doxygen', required: build_documentation)
119118
dot = find_program('dot', required: build_documentation) # Used by Doxygen
120119
xsltproc = find_program('xsltproc', required: build_documentation)
@@ -141,6 +140,17 @@ sys.exit(os.path.isfile("@0@"))
141140
endif
142141
endif
143142

143+
# Check if perl is required and available.
144+
# Done now, when the doc_reference script is available.
145+
doc_perl_prop = run_command(
146+
python3, doc_reference, 'get_script_property',
147+
'', # MMDOCTOOLDIR is not used
148+
'requires_perl')
149+
if not (doc_perl_prop.returncode() == 0 and doc_perl_prop.stdout() == 'false')
150+
# Perl is required, if documentation shall be built.
151+
perl = find_program('perl', required: build_documentation)
152+
endif
153+
144154
# Set compiler warnings.
145155
warning_flags = []
146156
if warning_level == 'min'

untracked/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ 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
20-
doxygen-extra.css
21-
tagfile-to-devhelp2.xsl
18+
untracked/docs/doc_install.py or doc-install.pl
19+
doc_postprocess.py or doc-postprocess.pl
20+
doxygen-extra.css
21+
tagfile-to-devhelp2.xsl
2222
untracked/build_scripts/dist-build-scripts.py
2323
dist-changelog.py
2424
doc-reference.py

0 commit comments

Comments
 (0)