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