Skip to content

Commit 5073536

Browse files
committed
Meson build: Add the build-manual option
1 parent 6d38d01 commit 5073536

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

docs/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, book_name, 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_datadir / 'doc' / book_name / '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
@@ -335,16 +335,29 @@ if build_documentation_opt == 'if-maintainer-mode'
335335
real_build_documentation = ' (@0@)'.format(build_documentation)
336336
endif
337337

338-
validate = get_option('validation') and can_parse_and_validate
338+
explain_man = ''
339+
if build_manual_opt and not build_manual
340+
explain_man = ' (requires that documentation is built)'
341+
endif
342+
343+
validate = get_option('validation') and can_parse_and_validate and build_manual
339344
explain_val = ''
340345
if get_option('validation') and not validate
341-
explain_val = ' (requires xmllint with Relax NG and DocBook V5.0 support)'
346+
if not build_manual
347+
explain_val = ' (requires that the tutorial is built)'
348+
else
349+
explain_val = ' (requires xmllint with Relax NG and DocBook V5.0 support)'
350+
endif
342351
endif
343352

344-
build_pdf = build_pdf_by_default and can_build_pdf
353+
build_pdf = build_pdf_by_default and can_build_pdf and build_manual
345354
explain_pdf = ''
346355
if build_pdf_by_default and not build_pdf
347-
explain_pdf = ' (requires dblatex or (xsltproc and fop))'
356+
if not build_manual
357+
explain_pdf = ' (requires that the tutorial is built)'
358+
else
359+
explain_pdf = ' (requires dblatex or (xsltproc and fop))'
360+
endif
348361
endif
349362

350363
summary = [
@@ -357,6 +370,7 @@ summary = [
357370
format(cpp_warnings, warning_level, werror),
358371
' Build deprecated API: @0@'.format(build_deprecated_api),
359372
'Build HTML documentation: @0@@1@'.format(build_documentation_opt, real_build_documentation),
373+
' Build tutorial: @0@@1@'.format(build_manual, explain_man),
360374
' XML validation: @0@@1@'.format(validate, explain_val),
361375
' Build PDF: @0@@1@'.format(build_pdf, explain_pdf),
362376
' 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