2009-11-14 02:29:39 +01:00
|
|
|
prefix ?= /usr/local
|
|
|
|
mandir ?= $(prefix)/share/man
|
|
|
|
gitdir ?= $(shell git --exec-path)
|
|
|
|
|
2009-11-14 02:29:40 +01:00
|
|
|
gitver ?= $(word 3,$(shell git --version))
|
|
|
|
|
2009-11-14 02:29:39 +01:00
|
|
|
# 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
|
|
|
|
|
2009-05-30 20:05:33 +02:00
|
|
|
default:
|
|
|
|
@echo "git-subtree doesn't need to be built."
|
2009-11-04 20:50:33 +01:00
|
|
|
@echo "Just copy it somewhere on your PATH, like /usr/local/bin."
|
2009-05-30 20:05:33 +02:00
|
|
|
@echo
|
|
|
|
@echo "Try: make doc"
|
2009-11-21 01:43:47 +01:00
|
|
|
@echo " or: make test"
|
2009-05-30 20:05:33 +02:00
|
|
|
@false
|
|
|
|
|
2009-11-14 02:29:39 +01:00
|
|
|
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/
|
|
|
|
|
2009-05-30 20:05:33 +02:00
|
|
|
doc: git-subtree.1
|
|
|
|
|
|
|
|
%.1: %.xml
|
|
|
|
xmlto -m manpage-normal.xsl man $^
|
|
|
|
|
|
|
|
%.xml: %.txt
|
|
|
|
asciidoc -b docbook -d manpage -f asciidoc.conf \
|
2009-11-14 02:29:40 +01:00
|
|
|
-agit_version=$(gitver) $^
|
2009-11-21 01:43:47 +01:00
|
|
|
|
|
|
|
test:
|
|
|
|
./test.sh
|
2009-05-30 20:05:33 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *~ *.xml *.html *.1
|
|
|
|
rm -rf subproj mainline
|