Skip to content

Commit 5f31ad3

Browse files
committed
Meson build: Add the build-manual option
1 parent 631af2f commit 5f31ad3

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

docs/manual/meson.build

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
# input: install_datadir, sigcxx_pcname, tutorial_custom_cmd, python3,
44
# build_documentation, install_docdir, can_add_dist_script, xsltproc
55
# output: can_parse_and_validate, build_pdf_by_default, can_build_pdf,
6-
# install_tutorialdir
6+
# install_tutorialdir, build_manual_opt, build_manual
7+
8+
build_manual_opt = get_option('build-manual')
9+
build_manual = build_manual_opt and build_documentation
710

811
xmllint = find_program('xmllint', required: false)
912
can_parse_and_validate = xmllint.found()
10-
1113
validate = get_option('validation') ? 'true' : 'false'
1214

1315
dblatex = find_program('dblatex', required: false)
@@ -18,8 +20,8 @@ build_pdf_by_default = get_option('build-pdf')
1820
# Installation directories are relative to {prefix}.
1921
install_tutorialdir = install_docdir / 'tutorial'
2022

21-
if not build_documentation
22-
# Documentation shall not be built or installed.
23+
if not build_manual
24+
# The manual shall not be built or installed.
2325
# Return to the calling meson.build file.
2426
subdir_done()
2527
endif

meson.build

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,29 @@ if build_documentation_opt == 'if-maintainer-mode'
333333
real_build_documentation = ' (@0@)'.format(build_documentation)
334334
endif
335335

336-
validate = get_option('validation') and can_parse_and_validate
336+
explain_man = ''
337+
if build_manual_opt and not build_manual
338+
explain_man = ' (requires that documentation is built)'
339+
endif
340+
341+
validate = get_option('validation') and can_parse_and_validate and build_manual
337342
explain_val = ''
338343
if get_option('validation') and not validate
339-
explain_val = ' (requires xmllint with Relax NG and DocBook V5.0 support)'
344+
if not build_manual
345+
explain_val = ' (requires that the tutorial is built)'
346+
else
347+
explain_val = ' (requires xmllint with Relax NG and DocBook V5.0 support)'
348+
endif
340349
endif
341350

342-
build_pdf = build_pdf_by_default and can_build_pdf
351+
build_pdf = build_pdf_by_default and can_build_pdf and build_manual
343352
explain_pdf = ''
344353
if build_pdf_by_default and not build_pdf
345-
explain_pdf = ' (requires dblatex or (xsltproc and fop))'
354+
if not build_manual
355+
explain_pdf = ' (requires that the tutorial is built)'
356+
else
357+
explain_pdf = ' (requires dblatex or (xsltproc and fop))'
358+
endif
346359
endif
347360

348361
summary = [
@@ -355,6 +368,7 @@ summary = [
355368
format(cpp_warnings, warning_level, werror),
356369
' Build deprecated API: @0@'.format(build_deprecated_api),
357370
'Build HTML documentation: @0@@1@'.format(build_documentation_opt, real_build_documentation),
371+
' Build tutorial: @0@@1@'.format(build_manual, explain_man),
358372
' XML validation: @0@@1@'.format(validate, explain_val),
359373
' Build PDF: @0@@1@'.format(build_pdf, explain_pdf),
360374
' Build example programs: @0@'.format(build_examples),

meson_options.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ option('build-deprecated-api', type: 'boolean', value: true,
88
description: 'Build deprecated API and include it in the library')
99
option('build-documentation', type: 'combo', choices: ['false', 'if-maintainer-mode', 'true'],
1010
value: 'if-maintainer-mode', description: 'Build and install the documentation')
11+
option('build-manual', type: 'boolean', value: true,
12+
description: 'Build tutorial HTML files, if documentation is built')
1113
option('validation', type: 'boolean', value: true,
12-
description: 'Validate the tutorial XML file')
14+
description: 'Validate the tutorial XML file, if tutorial HTML files are built')
1315
option('build-pdf', type: 'boolean', value: false,
14-
description: 'Build tutorial PDF file')
16+
description: 'Build tutorial PDF file, if tutorial HTML files are built')
1517
option('build-examples', type: 'boolean', value: true,
1618
description: 'Build example programs')
1719
option('build-tests', type: 'boolean', value: true,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy