Skip to content

Commit aca4aed

Browse files
committed
meson: make doc build optional
Make it possible to disable the documentation build by passing, $ meson setup -Dbuild-docs=false Otherwise, the documentation will be built by default, as usual.
1 parent 94fe540 commit aca4aed

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

meson.options

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ option(
77
value: '',
88
description: 'Path to SAGE_LOCAL directory (only used for compatibility with the old Sage-the-Distro',
99
)
10+
11+
#
12+
# Boolean options
13+
#
14+
option(
15+
'build-docs',
16+
type: 'boolean',
17+
description: 'Build the HTML / PDF documentation'
18+
)

src/doc/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if not get_option('build-docs')
2+
subdir_done()
3+
endif
4+
15
sphinx_check = py_module.find_installation(required: false, modules: ['sphinx'])
26
if not sphinx_check.found()
37
warning(
@@ -6,6 +10,7 @@ if not sphinx_check.found()
610
subdir_done()
711
endif
812

13+
914
doc_src = []
1015
subdir('en/reference/repl')
1116
# TODO: Migrate this completely to meson

0 commit comments

Comments
 (0)