]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/Makefile
user-manual: reset to ORIG_HEAD not HEAD to undo merge
[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
e31952da 10ARTICLES += tutorial-2
dcc6e28f 11ARTICLES += core-tutorial
a1d4aa74
JH
12ARTICLES += cvs-migration
13ARTICLES += diffcore
14ARTICLES += howto-index
15ARTICLES += repository-layout
6d35cc76 16ARTICLES += hooks
db9536c8 17ARTICLES += everyday
4a5d6939 18ARTICLES += git-tools
8db9307c 19# with their own formatting rules.
d19fbc3c 20SP_ARTICLES = glossary howto/revert-branch-rebase user-manual
8db9307c
JH
21
22DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
789d5774 23
b2bf34d6
DG
24DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
25DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
26
d2b8593f 27prefix?=$(HOME)
e14421b9
JN
28bindir?=$(prefix)/bin
29mandir?=$(prefix)/man
7b8cf0cf
JN
30man1dir=$(mandir)/man1
31man7dir=$(mandir)/man7
a682ef9f 32# DESTDIR=
87a81c83 33
1187d756 34ASCIIDOC=asciidoc
26cfcfbf 35ASCIIDOC_EXTRA =
d2b8593f 36INSTALL?=install
6538d1ef 37DOC_REF = origin/man
87a81c83 38
95676853 39-include ../config.mak.autogen
4fa96e15 40-include ../config.mak
95676853 41
b2bf34d6
DG
42#
43# Please note that there is a minor bug in asciidoc.
44# The version after 6.0.3 _will_ include the patch found here:
45# http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
46#
47# Until that version is released you may have to apply the patch
48# yourself - yes, all 6 characters of it!
49#
50
51all: html man
b790abb8
DG
52
53html: $(DOC_HTML)
54
c7543ce0 55$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
b2bf34d6
DG
56
57man: man1 man7
58man1: $(DOC_MAN1)
59man7: $(DOC_MAN7)
b790abb8 60
b163512d 61install: man
7b8cf0cf 62 $(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
d44c92d6
CW
63 $(INSTALL) -m644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
64 $(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
87a81c83 65
37465016 66
93d69d86
JL
67#
68# Determine "include::" file references in asciidoc files.
69#
fb612d54 70doc.dep : $(wildcard *.txt) build-docdep.perl
a5ae8e64
JH
71 rm -f $@+ $@
72 perl ./build-docdep.perl >$@+
73 mv $@+ $@
93d69d86 74
a5ae8e64 75-include doc.dep
37465016 76
72fe6a59
JH
77cmds_txt = cmds-ancillaryinterrogators.txt \
78 cmds-ancillarymanipulators.txt \
79 cmds-mainporcelain.txt \
80 cmds-plumbinginterrogators.txt \
81 cmds-plumbingmanipulators.txt \
89bf2077
JH
82 cmds-synchingrepositories.txt \
83 cmds-synchelpers.txt \
84 cmds-purehelpers.txt \
85 cmds-foreignscminterface.txt
72fe6a59 86
be93fc08 87$(cmds_txt): cmd-list.perl $(MAN1_TXT)
72fe6a59 88 perl ./cmd-list.perl
b790abb8 89
72fe6a59 90git.7 git.html: git.txt core-intro.txt
93d69d86 91
b790abb8 92clean:
556b6600 93 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
72fe6a59 94 rm -f $(cmds_txt)
b790abb8
DG
95
96%.html : %.txt
26cfcfbf 97 $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
b790abb8 98
7984eabe 99%.1 %.7 : %.xml
776e994a 100 xmlto -m callouts.xsl man $<
b790abb8
DG
101
102%.xml : %.txt
1187d756 103 $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
3f971fc4 104
d19fbc3c 105user-manual.xml: user-manual.txt user-manual.conf
1187d756 106 $(ASCIIDOC) -b docbook -d book $<
d19fbc3c
BF
107
108user-manual.html: user-manual.xml
bfcd4ca3 109 xmlto html-nochunks $<
d19fbc3c 110
23bb8df2
JS
111glossary.html : glossary.txt sort_glossary.pl
112 cat $< | \
113 perl sort_glossary.pl | \
1187d756 114 $(ASCIIDOC) -b xhtml11 - > glossary.html
23bb8df2 115
e6fc2346
JH
116howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
117 rm -f $@+ $@
118 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
119 mv $@+ $@
120
8db9307c 121$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
1187d756 122 $(ASCIIDOC) -b xhtml11 $*.txt
e6fc2346
JH
123
124WEBDOC_DEST = /pub/software/scm/git/docs
125
8d0991d7
JH
126$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
127 rm -f $@+ $@
1187d756 128 sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+
8d0991d7
JH
129 mv $@+ $@
130
e6fc2346
JH
131install-webdoc : html
132 sh ./install-webdoc.sh $(WEBDOC_DEST)
6538d1ef
EW
133
134quick-install:
135 sh ./install-doc-quick.sh $(DOC_REF) $(mandir)