1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
--- doc/meson.build.orig 2018-04-04 08:23:50 UTC
+++ doc/meson.build
@@ -1,24 +1,28 @@
sphinx = find_program('sphinx-build', required:false)
-if sphinx.found()
- custom_target(
- 'HTML documentation',
- output: 'html',
- input: ['index.rst', 'conf.py'],
- command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
- build_by_default: true,
- install: true,
- install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
- )
+if sphinx.found() and get_option('manual')
+ if get_option('html_manual')
+ custom_target(
+ 'HTML documentation',
+ output: 'html',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/html_doctrees', meson.current_source_dir(), '@OUTPUT@'],
+ build_by_default: true,
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
+ )
+ endif
- custom_target(
- 'Manpage documentation',
- output: 'man',
- input: ['index.rst', 'conf.py'],
- command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'],
- build_by_default: true,
- install: true,
- install_dir: get_option('datadir'),
- )
+ if get_option('manual')
+ custom_target(
+ 'Manpage documentation',
+ output: 'man1',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
+ build_by_default: true,
+ install: true,
+ install_dir: get_option('mandir'),
+ )
+ endif
endif
if get_option('documentation')
|