]>
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 JH |
6 | ARTICLES = tutorial |
7 | ARTICLES += cvs-migration | |
8 | ARTICLES += diffcore | |
9 | ARTICLES += howto-index | |
10 | ARTICLES += repository-layout | |
6d35cc76 | 11 | ARTICLES += hooks |
8db9307c JH |
12 | # with their own formatting rules. |
13 | SP_ARTICLES = glossary howto/revert-branch-rebase | |
14 | ||
15 | DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) | |
789d5774 | 16 | |
b2bf34d6 DG |
17 | DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) |
18 | DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) | |
19 | ||
87a81c83 EB |
20 | prefix=$(HOME) |
21 | bin=$(prefix)/bin | |
22 | mandir=$(prefix)/man | |
23 | man1=$(mandir)/man1 | |
24 | man7=$(mandir)/man7 | |
a682ef9f | 25 | # DESTDIR= |
87a81c83 EB |
26 | |
27 | INSTALL=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 | ||
38 | all: html man | |
b790abb8 DG |
39 | |
40 | html: $(DOC_HTML) | |
41 | ||
b2bf34d6 DG |
42 | |
43 | man: man1 man7 | |
44 | man1: $(DOC_MAN1) | |
45 | man7: $(DOC_MAN7) | |
b790abb8 | 46 | |
87a81c83 | 47 | install: |
a682ef9f PB |
48 | $(INSTALL) -m755 -d $(DESTDIR)/$(man1) $(DESTDIR)/$(man7) |
49 | $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1) | |
50 | $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7) | |
87a81c83 | 51 | |
f77b100a | 52 | # 'include' dependencies |
dda2d79a | 53 | git-diff-%.txt: diff-format.txt diff-options.txt |
f77b100a | 54 | touch $@ |
b790abb8 DG |
55 | |
56 | clean: | |
8d0991d7 | 57 | rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html |
b790abb8 DG |
58 | |
59 | %.html : %.txt | |
71931c19 | 60 | asciidoc -b xhtml11 -d manpage $< |
b790abb8 | 61 | |
7984eabe | 62 | %.1 %.7 : %.xml |
b790abb8 DG |
63 | xmlto man $< |
64 | ||
65 | %.xml : %.txt | |
66 | asciidoc -b docbook -d manpage $< | |
3f971fc4 | 67 | |
8db9307c JH |
68 | git.html: git.txt ../README |
69 | ||
23bb8df2 JS |
70 | glossary.html : glossary.txt sort_glossary.pl |
71 | cat $< | \ | |
72 | perl sort_glossary.pl | \ | |
73 | asciidoc -b xhtml11 - > glossary.html | |
74 | ||
e6fc2346 JH |
75 | howto-index.txt: howto-index.sh $(wildcard howto/*.txt) |
76 | rm -f $@+ $@ | |
77 | sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ | |
78 | mv $@+ $@ | |
79 | ||
8db9307c JH |
80 | $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt |
81 | asciidoc -b xhtml11 $*.txt | |
e6fc2346 JH |
82 | |
83 | WEBDOC_DEST = /pub/software/scm/git/docs | |
84 | ||
8d0991d7 JH |
85 | $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt |
86 | rm -f $@+ $@ | |
87 | sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+ | |
88 | mv $@+ $@ | |
89 | ||
e6fc2346 JH |
90 | install-webdoc : html |
91 | sh ./install-webdoc.sh $(WEBDOC_DEST) |