Git fork

meson: generate articles

While the Meson build system already knows to generate man pages and our
user manual, it does not yet generate the random assortment of articles
that we have. Plug this gap.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
bcf7edee 8922506c

+164
+62
Documentation/howto/meson.build
··· 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', 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.txt', 30 + ) 31 + 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', 39 + ) 40 + 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 + ) 53 + 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
+36
Documentation/meson.build
··· 413 413 install: true, 414 414 install_dir: get_option('datadir') / 'doc/git-doc', 415 415 ) 416 + 417 + articles = [ 418 + 'DecisionMaking.txt', 419 + 'MyFirstContribution.txt', 420 + 'MyFirstObjectWalk.txt', 421 + 'ReviewingGuidelines.txt', 422 + 'SubmittingPatches', 423 + 'ToolsForGit.txt', 424 + 'git-bisect-lk2009.txt', 425 + 'git-tools.txt', 426 + ] 427 + 428 + foreach article : articles 429 + custom_target( 430 + command: asciidoc_common_options + [ 431 + '--backend=' + asciidoc_html, 432 + '--out-file=@OUTPUT@', 433 + '@INPUT@', 434 + ], 435 + input: article, 436 + output: fs.stem(article) + '.html', 437 + depends: documentation_deps, 438 + install: true, 439 + install_dir: get_option('datadir') / 'doc/git-doc', 440 + ) 441 + endforeach 442 + 443 + asciidoc_html_options = asciidoc_common_options + [ 444 + '--backend=' + asciidoc_html, 445 + '--out-file=@OUTPUT@', 446 + '--attribute', 'git-relative-html-prefix=../', 447 + '@INPUT@', 448 + ] 449 + 450 + subdir('howto') 451 + subdir('technical') 416 452 endif
+66
Documentation/technical/meson.build
··· 1 + api_docs = [ 2 + 'api-error-handling.txt', 3 + 'api-merge.txt', 4 + 'api-parse-options.txt', 5 + 'api-simple-ipc.txt', 6 + 'api-trace2.txt', 7 + ] 8 + 9 + articles = [ 10 + 'bitmap-format.txt', 11 + 'build-systems.txt', 12 + 'bundle-uri.txt', 13 + 'commit-graph.txt', 14 + 'directory-rename-detection.txt', 15 + 'hash-function-transition.txt', 16 + 'long-running-process-protocol.txt', 17 + 'multi-pack-index.txt', 18 + 'packfile-uri.txt', 19 + 'pack-heuristics.txt', 20 + 'parallel-checkout.txt', 21 + 'partial-clone.txt', 22 + 'platform-support.txt', 23 + 'racy-git.txt', 24 + 'reftable.txt', 25 + 'remembering-renames.txt', 26 + 'repository-version.txt', 27 + 'rerere.txt', 28 + 'scalar.txt', 29 + 'send-pack-pipeline.txt', 30 + 'shallow.txt', 31 + 'sparse-checkout.txt', 32 + 'sparse-index.txt', 33 + 'trivial-merge.txt', 34 + 'unit-tests.txt', 35 + ] 36 + 37 + api_index = custom_target( 38 + command: [ 39 + shell, 40 + meson.current_source_dir() / 'api-index.sh', 41 + meson.current_source_dir(), 42 + '@OUTPUT@', 43 + ], 44 + env: script_environment, 45 + input: api_docs, 46 + output: 'api-index.txt', 47 + ) 48 + 49 + custom_target( 50 + command: asciidoc_html_options, 51 + input: api_index, 52 + output: 'api-index.html', 53 + depends: documentation_deps, 54 + install: true, 55 + install_dir: get_option('datadir') / 'doc/git-doc/technical', 56 + ) 57 + 58 + foreach article : api_docs + articles 59 + custom_target( 60 + command: asciidoc_html_options, 61 + input: article, 62 + output: fs.stem(article) + '.html', 63 + install: true, 64 + install_dir: get_option('datadir') / 'doc/git-doc/technical', 65 + ) 66 + endforeach