subtree: add makefile target for html docs

The Makefile currently builds the roff manpage, but not the html form. As some people may prefer the latter, let's make it an option to build that, too. We also wire it into "make doc" so that it is built by default. This patch does not build or install it as part of "install-doc"; that would require extra infrastructure to handle installing the html as we do in git's regular Documentation/ tree. That can come later if somebody is interested. Tested-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Oct 29, 2013 at 12:30 UTC 95c62fb9ea35fab9706792e858ce66967501eb00
1 file changed +6 -1
contrib/subtree/Makefile
+6 -1
@@ -21,13 +21,14 @@ GIT_SUBTREE := git-subtree
21 GIT_SUBTREE_DOC := git-subtree.1
22 GIT_SUBTREE_XML := git-subtree.xml
23 GIT_SUBTREE_TXT := git-subtree.txt
24 +GIT_SUBTREE_HTML := git-subtree.html
25
26 all: $(GIT_SUBTREE)
27
28 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
29 cp $< $@ && chmod +x $@
30
30 -doc: $(GIT_SUBTREE_DOC)
31 +doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
32
33 install: $(GIT_SUBTREE)
34 $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
@@ -46,6 +47,10 @@ $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
47 asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
48 -agit_version=$(gitver) $^
49
50 +$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
51 + asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
52 + -agit_version=$(gitver) $^
53 +
54 test:
55 $(MAKE) -C t/ test
56