The third batch
[git/gitster.git] / Documentation / howto / meson.build
blobc023c104161e61ca0399b5390d59e20343746621
1 howto_sources = [
2   'coordinate-embargoed-releases.txt',
3   'keep-canonical-history-correct.txt',
4   'maintain-git.txt',
5   'new-command.txt',
6   'rebase-from-internal-branch.txt',
7   'rebuild-from-update-hook.txt',
8   'recover-corrupted-blob-object.txt',
9   'recover-corrupted-object-harder.txt',
10   'revert-a-faulty-merge.txt',
11   'revert-branch-rebase.txt',
12   'separating-topic-branches.txt',
13   'setup-git-server-over-http.txt',
14   'update-hook-example.txt',
15   'use-git-daemon.txt',
16   'using-merge-subtree.txt',
17   'using-signed-tag-in-pull-request.txt',
20 howto_index = custom_target(
21   command: [
22     shell,
23     meson.current_source_dir() / 'howto-index.sh',
24     '@INPUT@',
25   ],
26   env: script_environment,
27   capture: true,
28   input: howto_sources,
29   output: 'howto-index.txt',
32 custom_target(
33   command: asciidoc_html_options,
34   input: howto_index,
35   output: 'howto-index.html',
36   depends: documentation_deps,
37   install: true,
38   install_dir: get_option('datadir') / 'doc/git-doc',
41 foreach howto : howto_sources
42   howto_stripped = custom_target(
43     command: [
44       find_program('sed'),
45       '-e',
46       '1,/^$/d',
47       '@INPUT@',
48     ],
49     input: howto,
50     output: fs.stem(howto) + '.stripped',
51     capture: true,
52   )
54   custom_target(
55     command: asciidoc_html_options,
56     input: howto_stripped,
57     output: fs.stem(howto_stripped.full_path()) + '.html',
58     depends: documentation_deps,
59     install: true,
60     install_dir: get_option('datadir') / 'doc/git-doc/howto',
61   )
62 endforeach