refs.c: allow listing and deleting badly named refs
[alt-git.git] / contrib / subtree / Makefile
blobc2bd703ee3aa0fd734c71dc50c01085455d33773
1 # The default target of this Makefile is...
2 all::
4 -include ../../config.mak.autogen
5 -include ../../config.mak
7 prefix ?= /usr/local
8 mandir ?= $(prefix)/share/man
9 gitexecdir ?= $(prefix)/libexec/git-core
10 man1dir ?= $(mandir)/man1
12 ../../GIT-VERSION-FILE: FORCE
13 $(MAKE) -C ../../ GIT-VERSION-FILE
15 -include ../../GIT-VERSION-FILE
17 # this should be set to a 'standard' bsd-type install program
18 INSTALL ?= install
19 RM ?= rm -f
21 ASCIIDOC = asciidoc
22 XMLTO = xmlto
24 ifndef SHELL_PATH
25 SHELL_PATH = /bin/sh
26 endif
27 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
29 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
30 MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
32 GIT_SUBTREE_SH := git-subtree.sh
33 GIT_SUBTREE := git-subtree
35 GIT_SUBTREE_DOC := git-subtree.1
36 GIT_SUBTREE_XML := git-subtree.xml
37 GIT_SUBTREE_TXT := git-subtree.txt
38 GIT_SUBTREE_HTML := git-subtree.html
40 all:: $(GIT_SUBTREE)
42 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
43 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
44 chmod +x $@
46 doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
48 install: $(GIT_SUBTREE)
49 $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
50 $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
52 install-doc: install-man
54 install-man: $(GIT_SUBTREE_DOC)
55 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
56 $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
58 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
59 $(XMLTO) -m $(MANPAGE_XSL) man $^
61 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
62 $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
63 -agit_version=$(GIT_VERSION) $^
65 $(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
66 $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
67 -agit_version=$(GIT_VERSION) $^
69 test:
70 $(MAKE) -C t/ test
72 clean:
73 $(RM) $(GIT_SUBTREE)
74 $(RM) *.xml *.html *.1
76 .PHONY: FORCE