Use project config files
[git.git] / contrib / subtree / Makefile
blob21130af6f665599ff324b918b76023fa91b3f0a9
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 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
14 MANPAGE_NORMAL_XSL = ../../Documentation/manpage-normal.xsl
16 default:
17 @echo "git-subtree doesn't need to be built."
18 @echo "Just copy it somewhere on your PATH, like /usr/local/bin."
19 @echo
20 @echo "Try: make doc"
21 @echo " or: make test"
22 @false
24 install: install-exe install-doc
26 install-exe: git-subtree.sh
27 $(INSTALL_DIR) $(DESTDIR)/$(gitdir)
28 $(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree
30 install-doc: git-subtree.1
31 $(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
32 $(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/
34 doc: git-subtree.1
36 %.1: %.xml
37 xmlto -m $(MANPAGE_NORMAL_XSL) man $^
39 %.xml: %.txt
40 asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
41 -agit_version=$(gitver) $^
43 test:
44 ./test.sh
46 clean:
47 rm -f *~ *.xml *.html *.1
48 rm -rf subproj mainline