353fe7c986b2ff1f5a60b28a1fe714fc01b25a78
[git.git] / Documentation / Makefile
1 MAN1_TXT=$(wildcard git-*.txt)
2 MAN7_TXT=git.txt
3
4 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
5
6 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
7 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
8
9 #
10 # Please note that there is a minor bug in asciidoc.
11 # The version after 6.0.3 _will_ include the patch found here:
12 #   http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
13 #
14 # Until that version is released you may have to apply the patch
15 # yourself - yes, all 6 characters of it!
16 #
17
18 all: html man
19
20 html: $(DOC_HTML)
21
22
23 man: man1 man7
24 man1: $(DOC_MAN1)
25 man7: $(DOC_MAN7)
26
27 # 'include' dependencies
28 git-diff-%.txt: diff-format.txt diff-options.txt
29         touch $@
30
31 clean:
32         rm -f *.xml *.html *.1 *.7
33
34 %.html : %.txt
35         asciidoc -b css-embedded -d manpage $<
36
37 %.1 %.7 : %.xml
38         xmlto man $<
39
40 %.xml : %.txt
41         asciidoc -b docbook -d manpage $<