Lines 1-42
Link Here
|
1 |
--- doc/meson.build.orig 2018-06-15 04:16:53 UTC |
1 |
--- doc/meson.build.orig 2018-10-24 08:31:33 UTC |
2 |
+++ doc/meson.build |
2 |
+++ doc/meson.build |
3 |
@@ -1,16 +1,19 @@ |
3 |
@@ -15,5 +15,5 @@ custom_target( |
4 |
-sphinx = find_program('sphinx-build', required:false) |
4 |
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'], |
5 |
- |
5 |
build_by_default: true, |
6 |
-if sphinx.found() |
6 |
install: true, |
7 |
- custom_target( |
7 |
- install_dir: get_option('datadir'), |
8 |
- 'HTML documentation', |
8 |
+ install_dir: get_option('mandir'), |
9 |
- output: 'html', |
9 |
) |
10 |
- input: ['index.rst', 'conf.py'], |
|
|
11 |
- command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'], |
12 |
- build_by_default: true, |
13 |
- install: true, |
14 |
- install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()), |
15 |
- ) |
16 |
+use_sphinx = get_option('use_sphinx') |
17 |
|
18 |
+if use_sphinx == 'false' |
19 |
+ use_sphinx = false |
20 |
+elif use_sphinx == 'true' |
21 |
+ sphinx = find_program('sphinx-build', required:false) |
22 |
+ if not sphinx.found() |
23 |
+ error('can\'t find sphinx') |
24 |
+ endif |
25 |
+ use_sphinx = true |
26 |
+else |
27 |
+ sphinx = find_program('sphinx-build', required:false) |
28 |
+ use_sphinx = sphinx.found() |
29 |
+endif |
30 |
+ |
31 |
+if use_sphinx |
32 |
custom_target( |
33 |
'Manpage documentation', |
34 |
output: 'man', |
35 |
@@ -18,6 +21,6 @@ if sphinx.found() |
36 |
command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'], |
37 |
build_by_default: true, |
38 |
install: true, |
39 |
- install_dir: get_option('datadir'), |
40 |
+ install_dir: get_option('mandir'), |
41 |
) |
42 |
endif |