aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-09-29 22:19:06 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-09-29 22:19:06 +0200
commitde0e87f752f868e8e7b6de7a455cf3c52fe1fa40 (patch)
tree2563ad4d4cb4f5beb738e808d68cab8d8680abe3 /doc
parenteba7744c6cf0db8eed005bcde6185ad74c74fcc9 (diff)
downloadgnunet-de0e87f752f868e8e7b6de7a455cf3c52fe1fa40.tar.gz
gnunet-de0e87f752f868e8e7b6de7a455cf3c52fe1fa40.zip
BUILD: Meson, better handbook generation
Diffstat (limited to 'doc')
-rw-r--r--doc/handbook/meson.build42
-rw-r--r--doc/meson.build24
2 files changed, 43 insertions, 23 deletions
diff --git a/doc/handbook/meson.build b/doc/handbook/meson.build
new file mode 100644
index 000000000..9d33a277b
--- /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('handbook/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
diff --git a/doc/meson.build b/doc/meson.build
index 6bbc2b43e..84b3cfde2 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,24 +1,2 @@
1fs = import('fs') 1subdir('handbook')
2
3if fs.exists('handbook'/'html')
4 install_subdir('handbook/html',
5 install_dir: docdir,
6 strip_directory: false)
7else
8 sphinx = find_program('sphinx-build', native: true, required: true)
9
10 if sphinx.found()
11 sphinxhandbook = custom_target('handbook',
12 output: 'handbook',
13 command: [sphinx,
14 '-b', 'html',
15 #'-b', 'info',
16 meson.project_source_root()/'contrib'/'sphinx', '@OUTPUT@'/'html'],
17 install: true,
18 install_dir: docdir)
19 endif
20endif
21
22#install_data('handbook/texinfo/gnunet.texi',
23# install_dir: get_option('infodir'))
24subdir('man') 2subdir('man')