Add support for a pdf version of the user manual
Use dblatex in order to create a pdf version of the git user manual. No existing Makefile targets (including "all") are touched, so you need to explicitly say make pdf sudo make install-pdf to get user-manual.pdf created and installed. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna committed
Dec 10, 2008 at 23:44 UTC
a325a1a70b90a0cef39a258f1471e5770aa66eee
3 files changed
+22
Documentation/Makefile
+13
@@ -32,6 +32,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
32
prefix?=$(HOME)
33
bindir?=$(prefix)/bin
34
htmldir?=$(prefix)/share/doc/git-doc
35
+pdfdir?=$(prefix)/share/doc/git-doc
36
mandir?=$(prefix)/share/man
37
man1dir=$(mandir)/man1
38
man5dir=$(mandir)/man5
@@ -50,6 +51,7 @@ infodir?=$(prefix)/share/info
51
MAKEINFO=makeinfo
52
INSTALL_INFO=install-info
53
DOCBOOK2X_TEXI=docbook2x-texi
54
+DBLATEX=dblatex
55
ifndef PERL_PATH
56
PERL_PATH = /usr/bin/perl
57
endif
@@ -87,6 +89,8 @@ man7: $(DOC_MAN7)
89
90
info: git.info gitman.info
91
92
+pdf: user-manual.pdf
93
+
94
install: install-man
95
96
install-man: man
@@ -107,6 +111,10 @@ install-info: info
111
echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
112
fi
113
114
+install-pdf: pdf
115
+ $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
116
+ $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
117
+
118
install-html: html
119
sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
120
@@ -190,6 +198,11 @@ user-manual.texi: user-manual.xml
198
$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
199
mv $@+ $@
200
201
+user-manual.pdf: user-manual.xml
202
+ $(RM) $@+ $@
203
+ $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $<
204
+ mv $@+ $@
205
+
206
gitman.texi: $(MAN_XML) cat-texi.perl
207
$(RM) $@+ $@
208
($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --to-stdout $(xml);)) | \
INSTALL
+3
@@ -101,6 +101,9 @@ Issues of note:
101
Building and installing the info file additionally requires
102
makeinfo and docbook2X. Version 0.8.3 is known to work.
103
104
+ Building and installing the pdf file additionally requires
105
+ dblatex. Version 0.2.7 with asciidoc >= 8.2.7 is known to work.
106
+
107
The documentation is written for AsciiDoc 7, but "make
108
ASCIIDOC8=YesPlease doc" will let you format with AsciiDoc 8.
109
Makefile
+6
@@ -1306,6 +1306,9 @@ html:
1306
info:
1307
$(MAKE) -C Documentation info
1308
1309
+pdf:
1310
+ $(MAKE) -C Documentation pdf
1311
+
1312
TAGS:
1313
$(RM) TAGS
1314
$(FIND) . -name '*.[hcS]' -print | xargs etags -a
@@ -1448,6 +1451,9 @@ install-html:
1451
install-info:
1452
$(MAKE) -C Documentation install-info
1453
1454
+install-pdf:
1455
+ $(MAKE) -C Documentation install-pdf
1456
+
1457
quick-install-doc:
1458
$(MAKE) -C Documentation quick-install
1459