2012-04-10 06:39:08 +04:00
|
|
|
-include ../../config.mak.autogen
|
|
|
|
-include ../../config.mak
|
|
|
|
|
2012-04-10 05:22:55 +04:00
|
|
|
prefix ?= /usr/local
|
|
|
|
mandir ?= $(prefix)/share/man
|
2012-04-10 06:13:03 +04:00
|
|
|
libexecdir ?= $(prefix)/libexec/git-core
|
|
|
|
man1dir ?= $(mandir)/man1
|
2012-04-10 05:22:55 +04:00
|
|
|
|
|
|
|
gitver ?= $(word 3,$(shell git --version))
|
|
|
|
|
|
|
|
# this should be set to a 'standard' bsd-type install program
|
|
|
|
INSTALL ?= install
|
|
|
|
|
2012-01-30 02:17:43 +04:00
|
|
|
ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
|
|
|
|
MANPAGE_NORMAL_XSL = ../../Documentation/manpage-normal.xsl
|
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
GIT_SUBTREE_SH := git-subtree.sh
|
|
|
|
GIT_SUBTREE := git-subtree
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
GIT_SUBTREE_DOC := git-subtree.1
|
|
|
|
GIT_SUBTREE_XML := git-subtree.xml
|
|
|
|
GIT_SUBTREE_TXT := git-subtree.txt
|
2013-10-29 20:30:37 +04:00
|
|
|
GIT_SUBTREE_HTML := git-subtree.html
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
all: $(GIT_SUBTREE)
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
|
|
|
|
cp $< $@ && chmod +x $@
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2013-10-29 20:30:37 +04:00
|
|
|
doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
install: $(GIT_SUBTREE)
|
2013-07-30 12:16:09 +04:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
|
2013-02-05 08:06:05 +04:00
|
|
|
$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
|
2012-04-10 06:13:03 +04:00
|
|
|
|
|
|
|
install-doc: install-man
|
|
|
|
|
|
|
|
install-man: $(GIT_SUBTREE_DOC)
|
2013-02-05 08:06:06 +04:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
|
2013-02-05 08:06:05 +04:00
|
|
|
$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
|
2012-04-10 06:13:03 +04:00
|
|
|
|
|
|
|
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
|
2012-01-30 02:17:43 +04:00
|
|
|
xmlto -m $(MANPAGE_NORMAL_XSL) man $^
|
2012-04-10 05:22:55 +04:00
|
|
|
|
2012-04-10 06:13:03 +04:00
|
|
|
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
|
2012-01-30 02:17:43 +04:00
|
|
|
asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
|
2012-04-10 05:22:55 +04:00
|
|
|
-agit_version=$(gitver) $^
|
2012-01-30 02:17:43 +04:00
|
|
|
|
2013-10-29 20:30:37 +04:00
|
|
|
$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
|
|
|
|
asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
|
|
|
|
-agit_version=$(gitver) $^
|
|
|
|
|
2012-04-10 05:22:55 +04:00
|
|
|
test:
|
2012-04-10 07:07:02 +04:00
|
|
|
$(MAKE) -C t/ test
|
2012-04-10 05:22:55 +04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.xml *.html *.1
|
|
|
|
rm -rf subproj mainline
|