Documentation / Makefileon commit Link howto documents from the main git.txt documentation. (e6fc234)
   1MAN1_TXT=$(wildcard git-*.txt)
   2MAN7_TXT=git.txt
   3
   4DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
   5DOC_HTML += glossary.html
   6DOC_HTML += tutorial.html
   7DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
   8DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
   9
  10prefix=$(HOME)
  11bin=$(prefix)/bin
  12mandir=$(prefix)/man
  13man1=$(mandir)/man1
  14man7=$(mandir)/man7
  15# DESTDIR=
  16
  17INSTALL=install
  18
  19#
  20# Please note that there is a minor bug in asciidoc.
  21# The version after 6.0.3 _will_ include the patch found here:
  22#   http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
  23#
  24# Until that version is released you may have to apply the patch
  25# yourself - yes, all 6 characters of it!
  26#
  27
  28all: html man
  29
  30html: $(DOC_HTML)
  31
  32
  33man: man1 man7
  34man1: $(DOC_MAN1)
  35man7: $(DOC_MAN7)
  36
  37install:
  38        $(INSTALL) -m755 -d $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
  39        $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
  40        $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
  41
  42# 'include' dependencies
  43git-diff-%.txt: diff-format.txt diff-options.txt
  44        touch $@
  45
  46clean:
  47        rm -f *.xml *.html *.1 *.7 howto-index.txt
  48
  49%.html : %.txt
  50        asciidoc -b xhtml11 -d manpage $<
  51
  52%.1 %.7 : %.xml
  53        xmlto man $<
  54
  55%.xml : %.txt
  56        asciidoc -b docbook -d manpage $<
  57
  58glossary.html : glossary.txt sort_glossary.pl
  59        cat $< | \
  60        perl sort_glossary.pl | \
  61        asciidoc -b xhtml11 - > glossary.html
  62
  63tutorial.html : tutorial.txt
  64        asciidoc -b xhtml11 tutorial.txt
  65
  66howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
  67        rm -f $@+ $@
  68        sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
  69        mv $@+ $@
  70
  71howto-index.html: howto-index.txt
  72        asciidoc -b xhtml11 howto-index.txt
  73
  74WEBDOC_DEST = /pub/software/scm/git/docs
  75
  76install-webdoc : html
  77        sh ./install-webdoc.sh $(WEBDOC_DEST)