contrib/subtree/Makefile: clean up rules to generate documentation
[git.git] / contrib / subtree / Makefile
blobf3834b5bd6ebb91a611cf7a9f6ad8d8ccfe0cb58
1 -include ../../config.mak.autogen
2 -include ../../config.mak
4 prefix ?= /usr/local
5 mandir ?= $(prefix)/share/man
6 gitexecdir ?= $(prefix)/libexec/git-core
7 man1dir ?= $(mandir)/man1
9 ../../GIT-VERSION-FILE: FORCE
10 $(MAKE) -C ../../ GIT-VERSION-FILE
12 -include ../../GIT-VERSION-FILE
14 # this should be set to a 'standard' bsd-type install program
15 INSTALL ?= install
17 ASCIIDOC = asciidoc
18 XMLTO = xmlto
20 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
21 MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
23 GIT_SUBTREE_SH := git-subtree.sh
24 GIT_SUBTREE := git-subtree
26 GIT_SUBTREE_DOC := git-subtree.1
27 GIT_SUBTREE_XML := git-subtree.xml
28 GIT_SUBTREE_TXT := git-subtree.txt
29 GIT_SUBTREE_HTML := git-subtree.html
31 all: $(GIT_SUBTREE)
33 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
34 cp $< $@ && chmod +x $@
36 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
38 install: $(GIT_SUBTREE)
39 $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
40 $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
42 install-doc: install-man
44 install-man: $(GIT_SUBTREE_DOC)
45 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
46 $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
48 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
49 $(XMLTO) -m $(MANPAGE_XSL) man $^
51 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
52 $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
53 -agit_version=$(GIT_VERSION) $^
55 $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
56 $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
57 -agit_version=$(GIT_VERSION) $^
59 test:
60 $(MAKE) -C t/ test
62 clean:
63 rm -f *~ *.xml *.html *.1
64 rm -rf subproj mainline
66 .PHONY: FORCE