diff options
Diffstat (limited to 'doc/handbook/meson.build')
-rw-r--r-- | doc/handbook/meson.build | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/handbook/meson.build b/doc/handbook/meson.build new file mode 100644 index 000000000..dd9a2ddcf --- /dev/null +++ b/doc/handbook/meson.build | |||
@@ -0,0 +1,42 @@ | |||
1 | fs = import('fs') | ||
2 | makeinfo = find_program('makeinfo', native: true, required: false) | ||
3 | sphinx = find_program('sphinx-build', native: true, required: false) | ||
4 | |||
5 | if fs.exists('html') | ||
6 | install_subdir('html', | ||
7 | install_dir: docdir, | ||
8 | strip_directory: false) | ||
9 | else | ||
10 | if sphinx.found() | ||
11 | sphinxhandbook = custom_target('handbook-html', | ||
12 | output: 'html', | ||
13 | command: [sphinx, | ||
14 | '-M', 'html', | ||
15 | meson.project_source_root()/'contrib'/'sphinx', meson.current_build_dir()], | ||
16 | install: true, | ||
17 | install_dir: docdir) | ||
18 | endif | ||
19 | endif | ||
20 | |||
21 | if fs.exists('texinfo') | ||
22 | install_data('texinfo'/'gnunet.info', | ||
23 | install_dir: get_option('infodir')) | ||
24 | else | ||
25 | if sphinx.found() | ||
26 | sphinxhandbooktexi = custom_target('handbook-texinfo', | ||
27 | output: ['texinfo'], | ||
28 | command: [sphinx, | ||
29 | '-M', 'texinfo', | ||
30 | meson.project_source_root()/'contrib'/'sphinx', meson.current_build_dir()], | ||
31 | install: false, | ||
32 | install_dir: get_option('infodir')) | ||
33 | custom_target('gnunet.info', | ||
34 | output: 'gnunet.info', | ||
35 | depends: sphinxhandbooktexi, | ||
36 | command: [makeinfo, '--no-split', '--no-headers', | ||
37 | meson.current_build_dir()/'texinfo'/'gnunet.texi', '-o', '@OUTPUT0@'], | ||
38 | install: true, | ||
39 | install_dir: get_option('infodir')) | ||
40 | endif | ||
41 | endif | ||
42 | |||