aboutsummaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-12-10 23:44:50 +0100
committerJunio C Hamano <gitster@pobox.com>2008-12-10 19:17:43 -0800
commita325a1a70b90a0cef39a258f1471e5770aa66eee (patch)
treefbf69800b68de223c5b1af95c2c1a4ccd80633d7 /Documentation/Makefile
parent5363d0744e7360beee990d3c2a8c1eb64a23071e (diff)
downloadgit-a325a1a70b90a0cef39a258f1471e5770aa66eee.tar.gz
git-a325a1a70b90a0cef39a258f1471e5770aa66eee.tar.xz
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>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index c34c1cae2..69f4ade06 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -32,6 +32,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
prefix?=$(HOME)
bindir?=$(prefix)/bin
htmldir?=$(prefix)/share/doc/git-doc
+pdfdir?=$(prefix)/share/doc/git-doc
mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
@@ -50,6 +51,7 @@ infodir?=$(prefix)/share/info
MAKEINFO=makeinfo
INSTALL_INFO=install-info
DOCBOOK2X_TEXI=docbook2x-texi
+DBLATEX=dblatex
ifndef PERL_PATH
PERL_PATH = /usr/bin/perl
endif
@@ -87,6 +89,8 @@ man7: $(DOC_MAN7)
info: git.info gitman.info
+pdf: user-manual.pdf
+
install: install-man
install-man: man
@@ -107,6 +111,10 @@ install-info: info
echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
fi
+install-pdf: pdf
+ $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
+ $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
+
install-html: html
sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
@@ -190,6 +198,11 @@ user-manual.texi: user-manual.xml
$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
mv $@+ $@
+user-manual.pdf: user-manual.xml
+ $(RM) $@+ $@
+ $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $<
+ mv $@+ $@
+
gitman.texi: $(MAN_XML) cat-texi.perl
$(RM) $@+ $@
($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --to-stdout $(xml);)) | \