gitview: Use horizontal scroll bar in the tree view
[git/jnareb-git.git] / Documentation / Makefile
bloba3bca86cb0aeb23ea67658de039c5ab79d66d898
1 MAN1_TXT=$(wildcard git-*.txt) gitk.txt
2 MAN7_TXT=git.txt
4 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
6 ARTICLES = tutorial
7 ARTICLES += core-tutorial
8 ARTICLES += cvs-migration
9 ARTICLES += diffcore
10 ARTICLES += howto-index
11 ARTICLES += repository-layout
12 ARTICLES += hooks
13 ARTICLES += everyday
14 # with their own formatting rules.
15 SP_ARTICLES = glossary howto/revert-branch-rebase
17 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
19 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
20 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
22 prefix?=$(HOME)
23 bin=$(prefix)/bin
24 mandir=$(prefix)/man
25 man1=$(mandir)/man1
26 man7=$(mandir)/man7
27 # DESTDIR=
29 INSTALL?=install
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
36 # Until that version is released you may have to apply the patch
37 # yourself - yes, all 6 characters of it!
40 all: html man
42 html: $(DOC_HTML)
45 man: man1 man7
46 man1: $(DOC_MAN1)
47 man7: $(DOC_MAN7)
49 install: man
50 $(INSTALL) -d -m755 $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
51 $(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
52 $(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
56 # Determine "include::" file references in asciidoc files.
58 doc.dep : $(wildcard *.txt) build-docdep.perl
59 rm -f $@+ $@
60 perl ./build-docdep.perl >$@+
61 mv $@+ $@
63 -include doc.dep
65 git.7: README
67 README: ../README
68 cp $< $@
71 clean:
72 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
74 %.html : %.txt
75 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
77 %.1 %.7 : %.xml
78 xmlto man $<
80 %.xml : %.txt
81 asciidoc -b docbook -d manpage -f asciidoc.conf $<
83 git.html: git.txt README
85 glossary.html : glossary.txt sort_glossary.pl
86 cat $< | \
87 perl sort_glossary.pl | \
88 asciidoc -b xhtml11 - > glossary.html
90 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
91 rm -f $@+ $@
92 sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
93 mv $@+ $@
95 $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
96 asciidoc -b xhtml11 $*.txt
98 WEBDOC_DEST = /pub/software/scm/git/docs
100 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
101 rm -f $@+ $@
102 sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
103 mv $@+ $@
105 install-webdoc : html
106 sh ./install-webdoc.sh $(WEBDOC_DEST)