Merge branch 'es/rebase-i-no-abbrev' into maint
[git/gitweb.git] / contrib / subtree / Makefile
blob435b2dea293b01daaad83e6905148be2256c02df
1 -include ../../config.mak.autogen
2 -include ../../config.mak
4 prefix ?= /usr/local
5 mandir ?= $(prefix)/share/man
6 libexecdir ?= $(prefix)/libexec/git-core
7 gitdir ?= $(shell git --exec-path)
8 man1dir ?= $(mandir)/man1
10 gitver ?= $(word 3,$(shell git --version))
12 # this should be set to a 'standard' bsd-type install program
13 INSTALL ?= install
15 ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
16 MANPAGE_NORMAL_XSL = ../../Documentation/manpage-normal.xsl
18 GIT_SUBTREE_SH := git-subtree.sh
19 GIT_SUBTREE := git-subtree
21 GIT_SUBTREE_DOC := git-subtree.1
22 GIT_SUBTREE_XML := git-subtree.xml
23 GIT_SUBTREE_TXT := git-subtree.txt
25 all: $(GIT_SUBTREE)
27 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
28 cp $< $@ && chmod +x $@
30 doc: $(GIT_SUBTREE_DOC)
32 install: $(GIT_SUBTREE)
33 $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
34 $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
36 install-doc: install-man
38 install-man: $(GIT_SUBTREE_DOC)
39 $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
40 $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
42 $(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
43 xmlto -m $(MANPAGE_NORMAL_XSL) man $^
45 $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
46 asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
47 -agit_version=$(gitver) $^
49 test:
50 $(MAKE) -C t/ test
52 clean:
53 rm -f *~ *.xml *.html *.1
54 rm -rf subproj mainline