summaryrefslogtreecommitdiff
path: root/contrib/subtree/Makefile
diff options
context:
space:
mode:
authorDavid A. Greene <greened@obbligato.org>2012-04-10 01:22:55 (GMT)
committerDavid A. Greene <greened@obbligato.org>2012-04-10 01:22:55 (GMT)
commit634392b26275fe5436c0ea131bc89b46476aa4ae (patch)
tree728d3c779524e2b78ee5b088eeb5ecccdb081779 /contrib/subtree/Makefile
parente8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d (diff)
parentd3a04e06c77d57978bb5230361c64946232cc346 (diff)
downloadgit-634392b26275fe5436c0ea131bc89b46476aa4ae.zip
git-634392b26275fe5436c0ea131bc89b46476aa4ae.tar.gz
git-634392b26275fe5436c0ea131bc89b46476aa4ae.tar.bz2
Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'
git-subtree-dir: contrib/subtree git-subtree-mainline: e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d git-subtree-split: d3a04e06c77d57978bb5230361c64946232cc346
Diffstat (limited to 'contrib/subtree/Makefile')
-rw-r--r--contrib/subtree/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
new file mode 100644
index 0000000..91e0cc0
--- /dev/null
+++ b/contrib/subtree/Makefile
@@ -0,0 +1,45 @@
+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
+
+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
+ xmlto -m manpage-normal.xsl man $^
+
+%.xml: %.txt
+ asciidoc -b docbook -d manpage -f asciidoc.conf \
+ -agit_version=$(gitver) $^
+
+test:
+ ./test.sh
+
+clean:
+ rm -f *~ *.xml *.html *.1
+ rm -rf subproj mainline