]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/Makefile
tutorial: expanded discussion of commit history
[thirdparty/git.git] / Documentation / Makefile
CommitLineData
4a5d6939
MW
1MAN1_TXT= \
2 $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
3 $(wildcard git-*.txt)) \
4 gitk.txt
b2bf34d6 5MAN7_TXT=git.txt
b790abb8 6
2a29da7c 7DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
8db9307c 8
a1d4aa74 9ARTICLES = tutorial
dcc6e28f 10ARTICLES += core-tutorial
a1d4aa74
JH
11ARTICLES += cvs-migration
12ARTICLES += diffcore
13ARTICLES += howto-index
14ARTICLES += repository-layout
6d35cc76 15ARTICLES += hooks
db9536c8 16ARTICLES += everyday
4a5d6939 17ARTICLES += git-tools
8db9307c
JH
18# with their own formatting rules.
19SP_ARTICLES = glossary howto/revert-branch-rebase
20
21DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
789d5774 22
b2bf34d6
DG
23DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
24DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
25
d2b8593f 26prefix?=$(HOME)
87a81c83
EB
27bin=$(prefix)/bin
28mandir=$(prefix)/man
29man1=$(mandir)/man1
30man7=$(mandir)/man7
a682ef9f 31# DESTDIR=
87a81c83 32
d2b8593f 33INSTALL?=install
87a81c83 34
b2bf34d6
DG
35#
36# Please note that there is a minor bug in asciidoc.
37# The version after 6.0.3 _will_ include the patch found here:
38# http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
39#
40# Until that version is released you may have to apply the patch
41# yourself - yes, all 6 characters of it!
42#
43
44all: html man
b790abb8
DG
45
46html: $(DOC_HTML)
47
b2bf34d6
DG
48
49man: man1 man7
50man1: $(DOC_MAN1)
51man7: $(DOC_MAN7)
b790abb8 52
b163512d 53install: man
53764ee4 54 $(INSTALL) -d -m755 $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
a682ef9f
PB
55 $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
56 $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
87a81c83 57
37465016 58
93d69d86
JL
59#
60# Determine "include::" file references in asciidoc files.
61#
fb612d54 62doc.dep : $(wildcard *.txt) build-docdep.perl
a5ae8e64
JH
63 rm -f $@+ $@
64 perl ./build-docdep.perl >$@+
65 mv $@+ $@
93d69d86 66
a5ae8e64 67-include doc.dep
37465016 68
941c9449
PR
69git.7: README
70
71README: ../README
72 cp $< $@
b790abb8 73
93d69d86 74
b790abb8 75clean:
941c9449 76 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
b790abb8
DG
77
78%.html : %.txt
d1c2e113 79 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
b790abb8 80
7984eabe 81%.1 %.7 : %.xml
776e994a 82 xmlto -m callouts.xsl man $<
b790abb8
DG
83
84%.xml : %.txt
d1c2e113 85 asciidoc -b docbook -d manpage -f asciidoc.conf $<
3f971fc4 86
941c9449 87git.html: git.txt README
8db9307c 88
23bb8df2
JS
89glossary.html : glossary.txt sort_glossary.pl
90 cat $< | \
91 perl sort_glossary.pl | \
92 asciidoc -b xhtml11 - > glossary.html
93
e6fc2346
JH
94howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
95 rm -f $@+ $@
96 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
97 mv $@+ $@
98
8db9307c
JH
99$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
100 asciidoc -b xhtml11 $*.txt
e6fc2346
JH
101
102WEBDOC_DEST = /pub/software/scm/git/docs
103
8d0991d7
JH
104$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
105 rm -f $@+ $@
106 sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
107 mv $@+ $@
108
e6fc2346
JH
109install-webdoc : html
110 sh ./install-webdoc.sh $(WEBDOC_DEST)