contrib / subtree / Makefileon commit fetch: make --prune configurable (737c5a9)
   1-include ../../config.mak.autogen
   2-include ../../config.mak
   3
   4prefix ?= /usr/local
   5mandir ?= $(prefix)/share/man
   6libexecdir ?= $(prefix)/libexec/git-core
   7gitdir ?= $(shell git --exec-path)
   8man1dir ?= $(mandir)/man1
   9
  10gitver ?= $(word 3,$(shell git --version))
  11
  12# this should be set to a 'standard' bsd-type install program
  13INSTALL ?= install
  14
  15ASCIIDOC_CONF      = ../../Documentation/asciidoc.conf
  16MANPAGE_NORMAL_XSL =  ../../Documentation/manpage-normal.xsl
  17
  18GIT_SUBTREE_SH := git-subtree.sh
  19GIT_SUBTREE    := git-subtree
  20
  21GIT_SUBTREE_DOC := git-subtree.1
  22GIT_SUBTREE_XML := git-subtree.xml
  23GIT_SUBTREE_TXT := git-subtree.txt
  24
  25all: $(GIT_SUBTREE)
  26
  27$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
  28        cp $< $@ && chmod +x $@
  29
  30doc: $(GIT_SUBTREE_DOC)
  31
  32install: $(GIT_SUBTREE)
  33        $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
  34
  35install-doc: install-man
  36
  37install-man: $(GIT_SUBTREE_DOC)
  38        $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
  39        $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
  40
  41$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
  42        xmlto -m $(MANPAGE_NORMAL_XSL)  man $^
  43
  44$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
  45        asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
  46                -agit_version=$(gitver) $^
  47
  48test:
  49        $(MAKE) -C t/ test
  50
  51clean:
  52        rm -f *~ *.xml *.html *.1
  53        rm -rf subproj mainline