Merge branch 'ps/build-meson-subtree'
The meson-driven build is now aware of "git-subtree" housed in contrib/subtree hierarchy. * ps/build-meson-subtree: meson: wire up the git-subtree(1) command meson: introduce build option for contrib contrib/subtree: fix building docs
This commit is contained in:
@ -1 +1,3 @@
|
|||||||
subdir('completion')
|
foreach feature : get_option('contrib')
|
||||||
|
subdir(feature)
|
||||||
|
endforeach
|
||||||
|
2
contrib/subtree/.gitignore
vendored
2
contrib/subtree/.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
*~
|
*~
|
||||||
|
asciidoc.conf
|
||||||
|
asciidoctor-extensions.rb
|
||||||
git-subtree
|
git-subtree
|
||||||
git-subtree.1
|
git-subtree.1
|
||||||
git-subtree.html
|
git-subtree.html
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# The default target of this Makefile is...
|
# The default target of this Makefile is...
|
||||||
all::
|
all::
|
||||||
|
|
||||||
|
-include ../../shared.mak
|
||||||
-include ../../config.mak.autogen
|
-include ../../config.mak.autogen
|
||||||
-include ../../config.mak
|
-include ../../config.mak
|
||||||
|
|
||||||
@ -13,17 +14,16 @@ htmldir ?= $(prefix)/share/doc/git-doc
|
|||||||
../../GIT-VERSION-FILE: FORCE
|
../../GIT-VERSION-FILE: FORCE
|
||||||
$(MAKE) -C ../../ GIT-VERSION-FILE
|
$(MAKE) -C ../../ GIT-VERSION-FILE
|
||||||
|
|
||||||
-include ../../GIT-VERSION-FILE
|
|
||||||
|
|
||||||
# this should be set to a 'standard' bsd-type install program
|
# this should be set to a 'standard' bsd-type install program
|
||||||
INSTALL ?= install
|
INSTALL ?= install
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
|
|
||||||
ASCIIDOC = asciidoc
|
ASCIIDOC = asciidoc
|
||||||
ASCIIDOC_CONF = -f ../../Documentation/asciidoc.conf
|
ASCIIDOC_CONF = -f asciidoc.conf
|
||||||
ASCIIDOC_HTML = xhtml11
|
ASCIIDOC_HTML = xhtml11
|
||||||
ASCIIDOC_DOCBOOK = docbook
|
ASCIIDOC_DOCBOOK = docbook
|
||||||
ASCIIDOC_EXTRA =
|
ASCIIDOC_EXTRA =
|
||||||
|
ASCIIDOC_DEPS = asciidoc.conf
|
||||||
XMLTO = xmlto
|
XMLTO = xmlto
|
||||||
XMLTO_EXTRA =
|
XMLTO_EXTRA =
|
||||||
|
|
||||||
@ -32,8 +32,9 @@ ASCIIDOC = asciidoctor
|
|||||||
ASCIIDOC_CONF =
|
ASCIIDOC_CONF =
|
||||||
ASCIIDOC_HTML = xhtml5
|
ASCIIDOC_HTML = xhtml5
|
||||||
ASCIIDOC_DOCBOOK = docbook
|
ASCIIDOC_DOCBOOK = docbook
|
||||||
ASCIIDOC_EXTRA += -I../../Documentation -rasciidoctor-extensions
|
ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
|
||||||
ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
|
ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
|
||||||
|
ASCIIDOC_DEPS = asciidoctor-extensions.rb
|
||||||
XMLTO_EXTRA += --skip-validation
|
XMLTO_EXTRA += --skip-validation
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -82,13 +83,13 @@ install-html: $(GIT_SUBTREE_HTML)
|
|||||||
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
|
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
|
||||||
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $^
|
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $^
|
||||||
|
|
||||||
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
|
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT) $(ASCIIDOC_DEPS)
|
||||||
$(ASCIIDOC) -b $(ASCIIDOC_DOCBOOK) -d manpage $(ASCIIDOC_CONF) \
|
$(ASCIIDOC) -b $(ASCIIDOC_DOCBOOK) -d manpage $(ASCIIDOC_CONF) \
|
||||||
-agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
|
$(ASCIIDOC_EXTRA) $<
|
||||||
|
|
||||||
$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
|
$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT) $(ASCIIDOC_DEPS)
|
||||||
$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage $(ASCIIDOC_CONF) \
|
$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage $(ASCIIDOC_CONF) \
|
||||||
-agit_version=$(GIT_VERSION) $(ASCIIDOC_EXTRA) $^
|
$(ASCIIDOC_EXTRA) $<
|
||||||
|
|
||||||
$(GIT_SUBTREE_TEST): $(GIT_SUBTREE)
|
$(GIT_SUBTREE_TEST): $(GIT_SUBTREE)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
@ -98,6 +99,12 @@ test: $(GIT_SUBTREE_TEST)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(GIT_SUBTREE)
|
$(RM) $(GIT_SUBTREE)
|
||||||
|
$(RM) asciidoc.conf asciidoctor-extensions.rb
|
||||||
$(RM) *.xml *.html *.1
|
$(RM) *.xml *.html *.1
|
||||||
|
|
||||||
|
asciidoc.conf: ../../Documentation/asciidoc.conf.in ../../GIT-VERSION-FILE
|
||||||
|
$(QUIET_GEN)$(call version_gen,"$(shell pwd)/../..",$<,$@)
|
||||||
|
asciidoctor-extensions.rb: ../../Documentation/asciidoctor-extensions.rb.in ../../GIT-VERSION-FILE
|
||||||
|
$(QUIET_GEN)$(call version_gen,"$(shell pwd)/../..",$<,$@)
|
||||||
|
|
||||||
.PHONY: FORCE
|
.PHONY: FORCE
|
||||||
|
71
contrib/subtree/meson.build
Normal file
71
contrib/subtree/meson.build
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
git_subtree = custom_target(
|
||||||
|
input: 'git-subtree.sh',
|
||||||
|
output: 'git-subtree',
|
||||||
|
command: [
|
||||||
|
shell,
|
||||||
|
meson.project_source_root() / 'generate-script.sh',
|
||||||
|
'@INPUT@',
|
||||||
|
'@OUTPUT@',
|
||||||
|
meson.project_build_root() / 'GIT-BUILD-OPTIONS',
|
||||||
|
],
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('libexecdir') / 'git-core',
|
||||||
|
)
|
||||||
|
|
||||||
|
subtree_test_environment = test_environment
|
||||||
|
subtree_test_environment.prepend('PATH', meson.current_build_dir())
|
||||||
|
|
||||||
|
test('t7900-subtree', shell,
|
||||||
|
args: [ 't7900-subtree.sh' ],
|
||||||
|
env: subtree_test_environment,
|
||||||
|
workdir: meson.current_source_dir() / 't',
|
||||||
|
depends: test_dependencies + bin_wrappers + [ git_subtree ],
|
||||||
|
timeout: 0,
|
||||||
|
)
|
||||||
|
|
||||||
|
if get_option('docs').contains('man')
|
||||||
|
subtree_xml = custom_target(
|
||||||
|
command: asciidoc_common_options + [
|
||||||
|
'--backend=' + asciidoc_docbook,
|
||||||
|
'--doctype=manpage',
|
||||||
|
'--out-file=@OUTPUT@',
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
depends: documentation_deps,
|
||||||
|
input: 'git-subtree.txt',
|
||||||
|
output: 'git-subtree.xml',
|
||||||
|
)
|
||||||
|
|
||||||
|
custom_target(
|
||||||
|
command: [
|
||||||
|
xmlto,
|
||||||
|
'-m', '@INPUT@',
|
||||||
|
'man',
|
||||||
|
subtree_xml,
|
||||||
|
'-o',
|
||||||
|
meson.current_build_dir(),
|
||||||
|
] + xmlto_extra,
|
||||||
|
input: [
|
||||||
|
'../../Documentation/manpage-normal.xsl',
|
||||||
|
],
|
||||||
|
output: 'git-subtree.1',
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('mandir') / 'man1',
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('docs').contains('html')
|
||||||
|
custom_target(
|
||||||
|
command: asciidoc_common_options + [
|
||||||
|
'--backend=' + asciidoc_html,
|
||||||
|
'--doctype=manpage',
|
||||||
|
'--out-file=@OUTPUT@',
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
|
depends: documentation_deps,
|
||||||
|
input: 'git-subtree.txt',
|
||||||
|
output: 'git-subtree.html',
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('datadir') / 'doc/git-doc',
|
||||||
|
)
|
||||||
|
endif
|
@ -1879,7 +1879,6 @@ endforeach
|
|||||||
if intl.found()
|
if intl.found()
|
||||||
subdir('po')
|
subdir('po')
|
||||||
endif
|
endif
|
||||||
subdir('contrib')
|
|
||||||
|
|
||||||
# Gitweb requires Perl, so we disable the auto-feature if Perl was not found.
|
# Gitweb requires Perl, so we disable the auto-feature if Perl was not found.
|
||||||
# We make sure further up that Perl is required in case the gitweb option is
|
# We make sure further up that Perl is required in case the gitweb option is
|
||||||
@ -1906,6 +1905,8 @@ if get_option('docs') != []
|
|||||||
subdir('Documentation')
|
subdir('Documentation')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
subdir('contrib')
|
||||||
|
|
||||||
foreach key, value : {
|
foreach key, value : {
|
||||||
'DIFF': diff.full_path(),
|
'DIFF': diff.full_path(),
|
||||||
'GIT_TEST_CMP': diff.full_path() + ' -u',
|
'GIT_TEST_CMP': diff.full_path() + ' -u',
|
||||||
|
@ -27,6 +27,8 @@ option('version', type: 'string', value: '',
|
|||||||
description: 'Version string reported by git-version(1) and other tools.')
|
description: 'Version string reported by git-version(1) and other tools.')
|
||||||
|
|
||||||
# Features supported by Git.
|
# Features supported by Git.
|
||||||
|
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
|
||||||
|
description: 'Contributed features to include.')
|
||||||
option('curl', type: 'feature', value: 'enabled',
|
option('curl', type: 'feature', value: 'enabled',
|
||||||
description: 'Build helpers used to access remotes with the HTTP transport.')
|
description: 'Build helpers used to access remotes with the HTTP transport.')
|
||||||
option('expat', type: 'feature', value: 'enabled',
|
option('expat', type: 'feature', value: 'enabled',
|
||||||
|
Reference in New Issue
Block a user