contrib / subtree / Makefileon commit Merge branch 'jm/doc-wording-tweaks' (668668a)
   1-include ../../config.mak.autogen
   2-include ../../config.mak
   3
   4prefix ?= /usr/local
   5mandir ?= $(prefix)/share/man
   6gitexecdir ?= $(prefix)/libexec/git-core
   7man1dir ?= $(mandir)/man1
   8
   9../../GIT-VERSION-FILE: FORCE
  10        $(MAKE) -C ../../ GIT-VERSION-FILE
  11
  12-include ../../GIT-VERSION-FILE
  13
  14# this should be set to a 'standard' bsd-type install program
  15INSTALL  ?= install
  16RM       ?= rm -f
  17
  18ASCIIDOC = asciidoc
  19XMLTO    = xmlto
  20
  21ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
  22MANPAGE_XSL   = ../../Documentation/manpage-normal.xsl
  23
  24GIT_SUBTREE_SH := git-subtree.sh
  25GIT_SUBTREE    := git-subtree
  26
  27GIT_SUBTREE_DOC := git-subtree.1
  28GIT_SUBTREE_XML := git-subtree.xml
  29GIT_SUBTREE_TXT := git-subtree.txt
  30GIT_SUBTREE_HTML := git-subtree.html
  31
  32all: $(GIT_SUBTREE)
  33
  34$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
  35        cp $< $@ && chmod +x $@
  36
  37doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
  38
  39install: $(GIT_SUBTREE)
  40        $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
  41        $(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
  42
  43install-doc: install-man
  44
  45install-man: $(GIT_SUBTREE_DOC)
  46        $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
  47        $(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
  48
  49$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
  50        $(XMLTO) -m $(MANPAGE_XSL) man $^
  51
  52$(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
  53        $(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
  54                -agit_version=$(GIT_VERSION) $^
  55
  56$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
  57        $(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
  58                -agit_version=$(GIT_VERSION) $^
  59
  60test:
  61        $(MAKE) -C t/ test
  62
  63clean:
  64        $(RM) $(GIT_SUBTREE)
  65        $(RM) *.xml *.html *.1
  66
  67.PHONY: FORCE