Documentation / Makefileon commit Merge with gitk. (638ccfd)
   1MAN1_TXT=$(wildcard git-*.txt)
   2MAN7_TXT=git.txt
   3
   4DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
   5
   6DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
   7DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
   8
   9prefix=$(HOME)
  10bin=$(prefix)/bin
  11mandir=$(prefix)/man
  12man1=$(mandir)/man1
  13man7=$(mandir)/man7
  14
  15INSTALL=install
  16
  17#
  18# Please note that there is a minor bug in asciidoc.
  19# The version after 6.0.3 _will_ include the patch found here:
  20#   http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
  21#
  22# Until that version is released you may have to apply the patch
  23# yourself - yes, all 6 characters of it!
  24#
  25
  26all: html man
  27
  28html: $(DOC_HTML)
  29
  30
  31man: man1 man7
  32man1: $(DOC_MAN1)
  33man7: $(DOC_MAN7)
  34
  35install:
  36        $(INSTALL) -m755 -d $(dest)/$(man1) $(dest)/$(man7)
  37        $(INSTALL) $(DOC_MAN1) $(dest)/$(man1)
  38        $(INSTALL) $(DOC_MAN7) $(dest)/$(man7)
  39
  40# 'include' dependencies
  41git-diff-%.txt: diff-format.txt diff-options.txt
  42        touch $@
  43
  44clean:
  45        rm -f *.xml *.html *.1 *.7
  46
  47%.html : %.txt
  48        asciidoc -b xhtml11 -d manpage $<
  49
  50%.1 %.7 : %.xml
  51        xmlto man $<
  52
  53%.xml : %.txt
  54        asciidoc -b docbook -d manpage $<