|
| 1 | +git_subtree = custom_target( |
| 2 | + input: 'git-subtree.sh', |
| 3 | + output: 'git-subtree', |
| 4 | + command: [ |
| 5 | + shell, |
| 6 | + meson.project_source_root() / 'generate-script.sh', |
| 7 | + '@INPUT@', |
| 8 | + '@OUTPUT@', |
| 9 | + meson.project_build_root() / 'GIT-BUILD-OPTIONS', |
| 10 | + ], |
| 11 | + install: true, |
| 12 | + install_dir: get_option('libexecdir') / 'git-core', |
| 13 | +) |
| 14 | + |
| 15 | +subtree_test_environment = test_environment |
| 16 | +subtree_test_environment.prepend('PATH', meson.current_build_dir()) |
| 17 | + |
| 18 | +test('t7900-subtree', shell, |
| 19 | + args: [ 't7900-subtree.sh' ], |
| 20 | + env: subtree_test_environment, |
| 21 | + workdir: meson.current_source_dir() / 't', |
| 22 | + depends: test_dependencies + bin_wrappers + [ git_subtree ], |
| 23 | + timeout: 0, |
| 24 | +) |
| 25 | + |
| 26 | +if get_option('docs').contains('man') |
| 27 | + subtree_xml = custom_target( |
| 28 | + command: asciidoc_common_options + [ |
| 29 | + '--backend=' + asciidoc_docbook, |
| 30 | + '--doctype=manpage', |
| 31 | + '--out-file=@OUTPUT@', |
| 32 | + '@INPUT@', |
| 33 | + ], |
| 34 | + depends: documentation_deps, |
| 35 | + input: 'git-subtree.txt', |
| 36 | + output: 'git-subtree.xml', |
| 37 | + ) |
| 38 | + |
| 39 | + custom_target( |
| 40 | + command: [ |
| 41 | + xmlto, |
| 42 | + '-m', '@INPUT@', |
| 43 | + 'man', |
| 44 | + subtree_xml, |
| 45 | + '-o', |
| 46 | + meson.current_build_dir(), |
| 47 | + ] + xmlto_extra, |
| 48 | + input: [ |
| 49 | + '../../Documentation/manpage-normal.xsl', |
| 50 | + ], |
| 51 | + output: 'git-subtree.1', |
| 52 | + install: true, |
| 53 | + install_dir: get_option('mandir') / 'man1', |
| 54 | + ) |
| 55 | +endif |
| 56 | + |
| 57 | +if get_option('docs').contains('html') |
| 58 | + custom_target( |
| 59 | + command: asciidoc_common_options + [ |
| 60 | + '--backend=' + asciidoc_html, |
| 61 | + '--doctype=manpage', |
| 62 | + '--out-file=@OUTPUT@', |
| 63 | + '@INPUT@', |
| 64 | + ], |
| 65 | + depends: documentation_deps, |
| 66 | + input: 'git-subtree.txt', |
| 67 | + output: 'git-subtree.html', |
| 68 | + install: true, |
| 69 | + install_dir: get_option('datadir') / 'doc/git-doc', |
| 70 | + ) |
| 71 | +endif |
0 commit comments