]>
Commit | Line | Data |
---|---|---|
88db5f80 | 1 | MAN1_TXT=$(wildcard git-*.txt) gitk.txt |
b2bf34d6 | 2 | MAN7_TXT=git.txt |
b790abb8 | 3 | |
2a29da7c JH |
4 | DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT)) |
5 | DOC_HTML += glossary.html | |
6 | DOC_HTML += tutorial.html | |
248542ea | 7 | DOC_HTML += howto-index.html |
b2bf34d6 DG |
8 | DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) |
9 | DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) | |
10 | ||
87a81c83 EB |
11 | prefix=$(HOME) |
12 | bin=$(prefix)/bin | |
13 | mandir=$(prefix)/man | |
14 | man1=$(mandir)/man1 | |
15 | man7=$(mandir)/man7 | |
a682ef9f | 16 | # DESTDIR= |
87a81c83 EB |
17 | |
18 | INSTALL=install | |
19 | ||
b2bf34d6 DG |
20 | # |
21 | # Please note that there is a minor bug in asciidoc. | |
22 | # The version after 6.0.3 _will_ include the patch found here: | |
23 | # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2 | |
24 | # | |
25 | # Until that version is released you may have to apply the patch | |
26 | # yourself - yes, all 6 characters of it! | |
27 | # | |
28 | ||
29 | all: html man | |
b790abb8 DG |
30 | |
31 | html: $(DOC_HTML) | |
32 | ||
b2bf34d6 DG |
33 | |
34 | man: man1 man7 | |
35 | man1: $(DOC_MAN1) | |
36 | man7: $(DOC_MAN7) | |
b790abb8 | 37 | |
87a81c83 | 38 | install: |
a682ef9f PB |
39 | $(INSTALL) -m755 -d $(DESTDIR)/$(man1) $(DESTDIR)/$(man7) |
40 | $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1) | |
41 | $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7) | |
87a81c83 | 42 | |
f77b100a | 43 | # 'include' dependencies |
dda2d79a | 44 | git-diff-%.txt: diff-format.txt diff-options.txt |
f77b100a | 45 | touch $@ |
b790abb8 DG |
46 | |
47 | clean: | |
8d0991d7 | 48 | rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html |
b790abb8 DG |
49 | |
50 | %.html : %.txt | |
71931c19 | 51 | asciidoc -b xhtml11 -d manpage $< |
b790abb8 | 52 | |
7984eabe | 53 | %.1 %.7 : %.xml |
b790abb8 DG |
54 | xmlto man $< |
55 | ||
56 | %.xml : %.txt | |
57 | asciidoc -b docbook -d manpage $< | |
3f971fc4 | 58 | |
23bb8df2 JS |
59 | glossary.html : glossary.txt sort_glossary.pl |
60 | cat $< | \ | |
61 | perl sort_glossary.pl | \ | |
62 | asciidoc -b xhtml11 - > glossary.html | |
63 | ||
2a29da7c JH |
64 | tutorial.html : tutorial.txt |
65 | asciidoc -b xhtml11 tutorial.txt | |
e6fc2346 JH |
66 | |
67 | howto-index.txt: howto-index.sh $(wildcard howto/*.txt) | |
68 | rm -f $@+ $@ | |
69 | sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ | |
70 | mv $@+ $@ | |
71 | ||
72 | howto-index.html: howto-index.txt | |
73 | asciidoc -b xhtml11 howto-index.txt | |
74 | ||
75 | WEBDOC_DEST = /pub/software/scm/git/docs | |
76 | ||
8d0991d7 JH |
77 | DOC_HTML += howto/revert-branch-rebase.html |
78 | ||
79 | $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt | |
80 | rm -f $@+ $@ | |
81 | sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+ | |
82 | mv $@+ $@ | |
83 | ||
e6fc2346 JH |
84 | install-webdoc : html |
85 | sh ./install-webdoc.sh $(WEBDOC_DEST) |