contrib / subtree / Makefileon commit Merge branch 'dk/blame-janitorial' (6784fab)
   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
  24GIT_SUBTREE_HTML := git-subtree.html
  25
  26all: $(GIT_SUBTREE)
  27
  28$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
  29        cp $< $@ && chmod +x $@
  30
  31doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
  32
  33install: $(GIT_SUBTREE)
  34        $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
  35        $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
  36
  37install-doc: install-man
  38
  39install-man: $(GIT_SUBTREE_DOC)
  40        $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
  41        $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
  42
  43$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
  44        xmlto -m $(MANPAGE_NORMAL_XSL)  man $^
  45
  46$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
  47        asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
  48                -agit_version=$(gitver) $^
  49
  50$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
  51        asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
  52                -agit_version=$(gitver) $^
  53
  54test:
  55        $(MAKE) -C t/ test
  56
  57clean:
  58        rm -f *~ *.xml *.html *.1
  59        rm -rf subproj mainline