1 # The default target of this Makefile is...
4 -include ../../config.mak.autogen
5 -include ../../config.mak
8 gitexecdir ?= $(prefix)/libexec/git-core
9 mandir ?= $(prefix)/share/man
10 man1dir ?= $(mandir)/man1
11 htmldir ?= $(prefix)/share/doc/git-doc
13 ../../GIT-VERSION-FILE: FORCE
14 $(MAKE) -C ../../ GIT-VERSION-FILE
16 -include ../../GIT-VERSION-FILE
18 # this should be set to a 'standard' bsd-type install program
28 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
30 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
31 MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
33 GIT_SUBTREE_SH := git-subtree.sh
34 GIT_SUBTREE := git-subtree
36 GIT_SUBTREE_DOC := git-subtree.1
37 GIT_SUBTREE_XML := git-subtree.xml
38 GIT_SUBTREE_TXT := git-subtree.txt
39 GIT_SUBTREE_HTML := git-subtree.html
43 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
44 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
47 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
49 install: $(GIT_SUBTREE)
50 $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
51 $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
53 install-doc: install-man install-html
55 install-man: $(GIT_SUBTREE_DOC)
56 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
57 $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
59 install-html: $(GIT_SUBTREE_HTML)
60 $(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
61 $(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
63 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
64 $(XMLTO) -m $(MANPAGE_XSL) man $^
66 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
67 $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
68 -agit_version=$(GIT_VERSION) $^
70 $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
71 $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
72 -agit_version=$(GIT_VERSION) $^
79 $(RM) *.xml *.html *.1