2012-04-10 04:39:08 +02:00
|
|
|
-include ../../config.mak.autogen
|
|
|
|
-include ../../config.mak
|
|
|
|
|
2012-04-10 03:22:55 +02:00
|
|
|
prefix ?= /usr/local
|
|
|
|
mandir ?= $(prefix)/share/man
|
2014-05-06 14:41:47 +02:00
|
|
|
gitexecdir ?= $(prefix)/libexec/git-core
|
2012-04-10 04:13:03 +02:00
|
|
|
man1dir ?= $(mandir)/man1
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2014-05-06 14:41:46 +02:00
|
|
|
../../GIT-VERSION-FILE: FORCE
|
|
|
|
$(MAKE) -C ../../ GIT-VERSION-FILE
|
|
|
|
|
|
|
|
-include ../../GIT-VERSION-FILE
|
2012-04-10 03:22:55 +02:00
|
|
|
|
|
|
|
# this should be set to a 'standard' bsd-type install program
|
2014-05-06 14:41:49 +02:00
|
|
|
INSTALL ?= install
|
|
|
|
RM ?= rm -f
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2014-05-06 14:41:48 +02:00
|
|
|
ASCIIDOC = asciidoc
|
|
|
|
XMLTO = xmlto
|
|
|
|
|
2014-07-19 18:08:57 +02:00
|
|
|
ifndef SHELL_PATH
|
|
|
|
SHELL_PATH = /bin/sh
|
|
|
|
endif
|
|
|
|
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
|
|
|
|
|
2014-05-06 14:41:48 +02:00
|
|
|
ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
|
|
|
|
MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
|
2012-01-29 23:17:43 +01:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
GIT_SUBTREE_SH := git-subtree.sh
|
|
|
|
GIT_SUBTREE := git-subtree
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
GIT_SUBTREE_DOC := git-subtree.1
|
|
|
|
GIT_SUBTREE_XML := git-subtree.xml
|
|
|
|
GIT_SUBTREE_TXT := git-subtree.txt
|
2013-10-29 17:30:37 +01:00
|
|
|
GIT_SUBTREE_HTML := git-subtree.html
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
all: $(GIT_SUBTREE)
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
|
2014-07-19 18:08:57 +02:00
|
|
|
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
|
|
|
|
chmod +x $@
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2013-10-29 17:30:37 +01:00
|
|
|
doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
install: $(GIT_SUBTREE)
|
2014-05-06 14:41:47 +02:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
|
|
|
|
$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
|
2012-04-10 04:13:03 +02:00
|
|
|
|
|
|
|
install-doc: install-man
|
|
|
|
|
|
|
|
install-man: $(GIT_SUBTREE_DOC)
|
2013-02-05 05:06:06 +01:00
|
|
|
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
|
2013-02-05 05:06:05 +01:00
|
|
|
$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
|
2012-04-10 04:13:03 +02:00
|
|
|
|
|
|
|
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
|
2014-05-06 14:41:48 +02:00
|
|
|
$(XMLTO) -m $(MANPAGE_XSL) man $^
|
2012-04-10 03:22:55 +02:00
|
|
|
|
2012-04-10 04:13:03 +02:00
|
|
|
$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
|
2014-05-06 14:41:48 +02:00
|
|
|
$(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
|
2014-05-06 14:41:46 +02:00
|
|
|
-agit_version=$(GIT_VERSION) $^
|
2012-01-29 23:17:43 +01:00
|
|
|
|
2013-10-29 17:30:37 +01:00
|
|
|
$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
|
2014-05-06 14:41:48 +02:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
|
2014-05-06 14:41:46 +02:00
|
|
|
-agit_version=$(GIT_VERSION) $^
|
2013-10-29 17:30:37 +01:00
|
|
|
|
2012-04-10 03:22:55 +02:00
|
|
|
test:
|
2012-04-10 05:07:02 +02:00
|
|
|
$(MAKE) -C t/ test
|
2012-04-10 03:22:55 +02:00
|
|
|
|
|
|
|
clean:
|
2014-05-06 14:41:49 +02:00
|
|
|
$(RM) $(GIT_SUBTREE)
|
|
|
|
$(RM) *.xml *.html *.1
|
2014-05-06 14:41:46 +02:00
|
|
|
|
|
|
|
.PHONY: FORCE
|