aboutsummaryrefslogtreecommitdiff
path: root/doc/handbook/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'doc/handbook/meson.build')
-rw-r--r--doc/handbook/meson.build42
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 @@
1fs = import('fs')
2makeinfo = find_program('makeinfo', native: true, required: false)
3sphinx = find_program('sphinx-build', native: true, required: false)
4
5if fs.exists('html')
6 install_subdir('html',
7 install_dir: docdir,
8 strip_directory: false)
9else
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
19endif
20
21if fs.exists('texinfo')
22 install_data('texinfo'/'gnunet.info',
23 install_dir: get_option('infodir'))
24else
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
41endif
42