git-subtree is in git 1.7.11 releases.
[git-subtree.git] / Makefile
blob91e0cc08ea514a954bd3bab035baf0eadac6644e
1 prefix ?= /usr/local
2 mandir ?= $(prefix)/share/man
3 gitdir ?= $(shell git --exec-path)
5 gitver ?= $(word 3,$(shell git --version))
7 # this should be set to a 'standard' bsd-type install program
8 INSTALL ?= install
9 INSTALL_DATA = $(INSTALL) -c -m 0644
10 INSTALL_EXE = $(INSTALL) -c -m 0755
11 INSTALL_DIR = $(INSTALL) -c -d -m 0755
13 default:
14 @echo "git-subtree doesn't need to be built."
15 @echo "Just copy it somewhere on your PATH, like /usr/local/bin."
16 @echo
17 @echo "Try: make doc"
18 @echo " or: make test"
19 @false
21 install: install-exe install-doc
23 install-exe: git-subtree.sh
24 $(INSTALL_DIR) $(DESTDIR)/$(gitdir)
25 $(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree
27 install-doc: git-subtree.1
28 $(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
29 $(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/
31 doc: git-subtree.1
33 %.1: %.xml
34 xmlto -m manpage-normal.xsl man $^
36 %.xml: %.txt
37 asciidoc -b docbook -d manpage -f asciidoc.conf \
38 -agit_version=$(gitver) $^
40 test:
41 ./test.sh
43 clean:
44 rm -f *~ *.xml *.html *.1
45 rm -rf subproj mainline