Update git-pack-objects documentation.
[debian-git.git] / Documentation / Makefile
blob3cfa360a9e4876286bfb37230daca6af8c799725
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 # with their own formatting rules.
13 SP_ARTICLES = glossary howto/revert-branch-rebase
15 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
17 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
18 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
20 prefix?=$(HOME)
21 bin=$(prefix)/bin
22 mandir=$(prefix)/man
23 man1=$(mandir)/man1
24 man7=$(mandir)/man7
25 # DESTDIR=
27 INSTALL?=install
30 # Please note that there is a minor bug in asciidoc.
31 # The version after 6.0.3 _will_ include the patch found here:
32 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
34 # Until that version is released you may have to apply the patch
35 # yourself - yes, all 6 characters of it!
38 all: html man
40 html: $(DOC_HTML)
43 man: man1 man7
44 man1: $(DOC_MAN1)
45 man7: $(DOC_MAN7)
47 install: man
48 $(INSTALL) -d -m755 $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
49 $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
50 $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
52 # 'include' dependencies
53 $(patsubst %.txt,%.1,$(wildcard git-diff-*.txt)): \
54 diff-format.txt diff-options.txt
55 $(patsubst %,%.1,git-fetch git-pull git-push): pull-fetch-param.txt
56 $(patsubst %.txt,%.html,$(wildcard git-diff-*.txt)): \
57 diff-format.txt diff-options.txt
58 $(patsubst %,%.html,git-fetch git-pull git-push): pull-fetch-param.txt
59 git.7: ../README
61 clean:
62 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html
64 %.html : %.txt
65 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
67 %.1 %.7 : %.xml
68 xmlto man $<
70 %.xml : %.txt
71 asciidoc -b docbook -d manpage -f asciidoc.conf $<
73 git.html: git.txt ../README
75 glossary.html : glossary.txt sort_glossary.pl
76 cat $< | \
77 perl sort_glossary.pl | \
78 asciidoc -b xhtml11 - > glossary.html
80 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
81 rm -f $@+ $@
82 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
83 mv $@+ $@
85 $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
86 asciidoc -b xhtml11 $*.txt
88 WEBDOC_DEST = /pub/software/scm/git/docs
90 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
91 rm -f $@+ $@
92 sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
93 mv $@+ $@
95 install-webdoc : html
96 sh ./install-webdoc.sh $(WEBDOC_DEST)