Merge branch 'kb/path-max-must-go'
[git/mingw/j6t.git] / contrib / subtree / Makefile
blobd888d4516114c719e46ab7f2aeb24e63618b7fac
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
16 RM ?= rm -f
18 ASCIIDOC = asciidoc
19 XMLTO = xmlto
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
32 all: $(GIT_SUBTREE)
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) $^
60 test:
61 $(MAKE) -C t/ test
63 clean:
64 $(RM) $(GIT_SUBTREE)
65 $(RM) *.xml *.html *.1
67 .PHONY: FORCE