1 -include ../../config.mak.autogen
2 -include ../../config.mak
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
21 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
22 MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
24 GIT_SUBTREE_SH := git-subtree.sh
25 GIT_SUBTREE := git-subtree
27 GIT_SUBTREE_DOC := git-subtree.1
28 GIT_SUBTREE_XML := git-subtree.xml
29 GIT_SUBTREE_TXT := git-subtree.txt
30 GIT_SUBTREE_HTML := git-subtree.html
34 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
35 cp $< $@ && chmod +x $@
37 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
39 install: $(GIT_SUBTREE)
40 $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
41 $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
43 install-doc: install-man
45 install-man: $(GIT_SUBTREE_DOC)
46 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
47 $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
49 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
50 $(XMLTO) -m $(MANPAGE_XSL) man $^
52 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
53 $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
54 -agit_version=$(GIT_VERSION) $^
56 $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
57 $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
58 -agit_version=$(GIT_VERSION) $^
65 $(RM) *.xml *.html *.1