Revert "check_packed_git_idx(): check integrity of the idx file itself."
[git/mingw/4msysgit/wingit-dll.git] / Documentation / Makefile
bloba1ff2c2170b5d552e948d49fc62559ae65a70b44
1 MAN1_TXT=$(wildcard git-*.txt) gitk.txt
2 MAN7_TXT=git.txt
4 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
6 ARTICLES = tutorial
7 ARTICLES += cvs-migration
8 ARTICLES += diffcore
9 ARTICLES += howto-index
10 ARTICLES += repository-layout
11 ARTICLES += hooks
12 ARTICLES += everyday
13 # with their own formatting rules.
14 SP_ARTICLES = glossary howto/revert-branch-rebase
16 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
18 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
19 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
21 prefix?=$(HOME)
22 bin=$(prefix)/bin
23 mandir=$(prefix)/man
24 man1=$(mandir)/man1
25 man7=$(mandir)/man7
26 # DESTDIR=
28 INSTALL?=install
31 # Please note that there is a minor bug in asciidoc.
32 # The version after 6.0.3 _will_ include the patch found here:
33 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
35 # Until that version is released you may have to apply the patch
36 # yourself - yes, all 6 characters of it!
39 all: html man
41 html: $(DOC_HTML)
44 man: man1 man7
45 man1: $(DOC_MAN1)
46 man7: $(DOC_MAN7)
48 install: man
49 $(INSTALL) -d -m755 $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
50 $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
51 $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
55 # Determine "include::" file references in asciidoc files.
57 doc.dep : $(wildcard *.txt) build-docdep.perl
58 rm -f $@+ $@
59 perl ./build-docdep.perl >$@+
60 mv $@+ $@
62 -include doc.dep
64 git.7: ../README
67 clean:
68 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
70 %.html : %.txt
71 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
73 %.1 %.7 : %.xml
74 xmlto man $<
76 %.xml : %.txt
77 asciidoc -b docbook -d manpage -f asciidoc.conf $<
79 git.html: git.txt ../README
81 glossary.html : glossary.txt sort_glossary.pl
82 cat $< | \
83 perl sort_glossary.pl | \
84 asciidoc -b xhtml11 - > glossary.html
86 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
87 rm -f $@+ $@
88 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
89 mv $@+ $@
91 $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
92 asciidoc -b xhtml11 $*.txt
94 WEBDOC_DEST = /pub/software/scm/git/docs
96 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
97 rm -f $@+ $@
98 sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
99 mv $@+ $@
101 install-webdoc : html
102 sh ./install-webdoc.sh $(WEBDOC_DEST)