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