]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/Makefile
Diff: -l<num> to limit rename/copy detection.
[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
8db9307c
JH
12# with their own formatting rules.
13SP_ARTICLES = glossary howto/revert-branch-rebase
14
15DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
789d5774 16
b2bf34d6
DG
17DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
18DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
19
87a81c83
EB
20prefix=$(HOME)
21bin=$(prefix)/bin
22mandir=$(prefix)/man
23man1=$(mandir)/man1
24man7=$(mandir)/man7
a682ef9f 25# DESTDIR=
87a81c83
EB
26
27INSTALL=install
28
b2bf34d6
DG
29#
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
33#
34# Until that version is released you may have to apply the patch
35# yourself - yes, all 6 characters of it!
36#
37
38all: html man
b790abb8
DG
39
40html: $(DOC_HTML)
41
b2bf34d6
DG
42
43man: man1 man7
44man1: $(DOC_MAN1)
45man7: $(DOC_MAN7)
b790abb8 46
b163512d 47install: man
53764ee4 48 $(INSTALL) -d -m755 $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
a682ef9f
PB
49 $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
50 $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
87a81c83 51
f77b100a 52# 'include' dependencies
b163512d
JH
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
56git.7: ../README
b790abb8
DG
57
58clean:
8d0991d7 59 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html
b790abb8
DG
60
61%.html : %.txt
d1c2e113 62 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
b790abb8 63
7984eabe 64%.1 %.7 : %.xml
b790abb8
DG
65 xmlto man $<
66
67%.xml : %.txt
d1c2e113 68 asciidoc -b docbook -d manpage -f asciidoc.conf $<
3f971fc4 69
8db9307c
JH
70git.html: git.txt ../README
71
23bb8df2
JS
72glossary.html : glossary.txt sort_glossary.pl
73 cat $< | \
74 perl sort_glossary.pl | \
75 asciidoc -b xhtml11 - > glossary.html
76
e6fc2346
JH
77howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
78 rm -f $@+ $@
79 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
80 mv $@+ $@
81
8db9307c
JH
82$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
83 asciidoc -b xhtml11 $*.txt
e6fc2346
JH
84
85WEBDOC_DEST = /pub/software/scm/git/docs
86
8d0991d7
JH
87$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
88 rm -f $@+ $@
89 sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
90 mv $@+ $@
91
e6fc2346
JH
92install-webdoc : html
93 sh ./install-webdoc.sh $(WEBDOC_DEST)