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
|
|
|
|
gitdir ?= $(shell git --exec-path)
|
|
|
|
|
|
|
|
gitver ?= $(word 3,$(shell git --version))
|
|
|
|
|
|
|
|
# this should be set to a 'standard' bsd-type install program
|
|
|
|
INSTALL ?= install
|
|
|
|
INSTALL_DATA = $(INSTALL) -c -m 0644
|
|
|
|
INSTALL_EXE = $(INSTALL) -c -m 0755
|
|
|
|
INSTALL_DIR = $(INSTALL) -c -d -m 0755
|
|
|
|
|
2012-01-29 23:17:43 +01:00
|
|
|
ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
|
|
|
|
MANPAGE_NORMAL_XSL = ../../Documentation/manpage-normal.xsl
|
|
|
|
|
2012-04-10 03:22:55 +02:00
|
|
|
default:
|
|
|
|
@echo "git-subtree doesn't need to be built."
|
|
|
|
@echo "Just copy it somewhere on your PATH, like /usr/local/bin."
|
|
|
|
@echo
|
|
|
|
@echo "Try: make doc"
|
|
|
|
@echo " or: make test"
|
|
|
|
@false
|
|
|
|
|
|
|
|
install: install-exe install-doc
|
|
|
|
|
|
|
|
install-exe: git-subtree.sh
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)/$(gitdir)
|
|
|
|
$(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree
|
|
|
|
|
|
|
|
install-doc: git-subtree.1
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
|
|
|
|
$(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/
|
|
|
|
|
|
|
|
doc: git-subtree.1
|
|
|
|
|
|
|
|
%.1: %.xml
|
2012-01-29 23:17:43 +01:00
|
|
|
xmlto -m $(MANPAGE_NORMAL_XSL) man $^
|
2012-04-10 03:22:55 +02:00
|
|
|
|
|
|
|
%.xml: %.txt
|
2012-01-29 23:17:43 +01:00
|
|
|
asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
|
2012-04-10 03:22:55 +02:00
|
|
|
-agit_version=$(gitver) $^
|
2012-01-29 23:17:43 +01:00
|
|
|
|
2012-04-10 03:22:55 +02:00
|
|
|
test:
|
|
|
|
./test.sh
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.xml *.html *.1
|
|
|
|
rm -rf subproj mainline
|