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