diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-09-29 22:19:06 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-09-29 22:19:06 +0200 |
commit | de0e87f752f868e8e7b6de7a455cf3c52fe1fa40 (patch) | |
tree | 2563ad4d4cb4f5beb738e808d68cab8d8680abe3 /doc | |
parent | eba7744c6cf0db8eed005bcde6185ad74c74fcc9 (diff) | |
download | gnunet-de0e87f752f868e8e7b6de7a455cf3c52fe1fa40.tar.gz gnunet-de0e87f752f868e8e7b6de7a455cf3c52fe1fa40.zip |
BUILD: Meson, better handbook generation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/handbook/meson.build | 42 | ||||
-rw-r--r-- | doc/meson.build | 24 |
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 @@ | |||
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('handbook/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 | |||
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 @@ | |||
1 | fs = import('fs') | 1 | subdir('handbook') |
2 | |||
3 | if fs.exists('handbook'/'html') | ||
4 | install_subdir('handbook/html', | ||
5 | install_dir: docdir, | ||
6 | strip_directory: false) | ||
7 | else | ||
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 | ||
20 | endif | ||
21 | |||
22 | #install_data('handbook/texinfo/gnunet.texi', | ||
23 | # install_dir: get_option('infodir')) | ||
24 | subdir('man') | 2 | subdir('man') |