|
| 1 | +howto_sources = [ |
| 2 | + 'coordinate-embargoed-releases.adoc', |
| 3 | + 'keep-canonical-history-correct.adoc', |
| 4 | + 'maintain-git.adoc', |
| 5 | + 'new-command.adoc', |
| 6 | + 'rebase-from-internal-branch.adoc', |
| 7 | + 'rebuild-from-update-hook.adoc', |
| 8 | + 'recover-corrupted-blob-object.adoc', |
| 9 | + 'recover-corrupted-object-harder.adoc', |
| 10 | + 'revert-a-faulty-merge.adoc', |
| 11 | + 'revert-branch-rebase.adoc', |
| 12 | + 'separating-topic-branches.adoc', |
| 13 | + 'setup-git-server-over-http.adoc', |
| 14 | + 'update-hook-example.adoc', |
| 15 | + 'use-git-daemon.adoc', |
| 16 | + 'using-merge-subtree.adoc', |
| 17 | + 'using-signed-tag-in-pull-request.adoc', |
| 18 | +] |
| 19 | + |
| 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.adoc', |
| 30 | +) |
| 31 | + |
| 32 | +doc_targets += 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', |
| 39 | +) |
| 40 | + |
| 41 | +foreach howto : howto_sources |
| 42 | + howto_stripped = custom_target( |
| 43 | + command: [ |
| 44 | + sed, |
| 45 | + '-e', |
| 46 | + '1,/^$/d', |
| 47 | + '@INPUT@', |
| 48 | + ], |
| 49 | + input: howto, |
| 50 | + output: fs.stem(howto) + '.stripped', |
| 51 | + capture: true, |
| 52 | + ) |
| 53 | + |
| 54 | + doc_targets += 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 |
0 commit comments