- use wkhtmltopdf to combine all html files into a single pdf file git-doc.pdf
- provide make target fullpdf to create git-doc.pdf
Signed-off-by: Thomas Ackermann th.ac...@arcor.de
---
Documentation/.gitignore | 1 +
Documentation/Makefile| 9 +
Documentation/footerend.txt | 4
Documentation/footerstart.txt | 7 +++
Documentation/makedocpdf.sh | 25 +
Makefile | 6 ++
6 files changed, 52 insertions(+)
create mode 100644 Documentation/footerend.txt
create mode 100644 Documentation/footerstart.txt
create mode 100644 Documentation/makedocpdf.sh
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index d62aebd..fba4730 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -10,3 +10,4 @@ howto-index.txt
doc.dep
cmds-*.txt
manpage-base-url.xsl
+docfiles.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index abd27b5..c4c2a30 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -189,6 +189,9 @@ info: git.info gitman.info
pdf: user-manual.pdf
+fullpdf: pdf all
+ ./makedocpdf.sh
+
install: install-man
install-man: man
@@ -213,6 +216,10 @@ install-pdf: pdf
$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
+install-fullpdf: fullpdf install-pdf
+ $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
+ $(INSTALL) -m 644 git-doc.pdf $(DESTDIR)$(pdfdir)
+
install-html: html
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
@@ -252,6 +259,8 @@ clean:
$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
$(RM) *.pdf
+ $(RM) docfiles.txt
+ $(RM) RelNotes/*.html
$(RM) howto-index.txt howto/*.html doc.dep
$(RM) technical/*.html technical/api-index.txt
$(RM) $(cmds_txt) *.made
diff --git a/Documentation/footerend.txt b/Documentation/footerend.txt
new file mode 100644
index 000..ed16923
--- /dev/null
+++ b/Documentation/footerend.txt
@@ -0,0 +1,4 @@
+/td
+ /tr
+/table
+/body/html
diff --git a/Documentation/footerstart.txt b/Documentation/footerstart.txt
new file mode 100644
index 000..a2746ef
--- /dev/null
+++ b/Documentation/footerstart.txt
@@ -0,0 +1,7 @@
+html
+head/head
+body style=border:0; margin: 0; onload=subst()
+table style=border-top: 1px solid black; width: 100%
+ tr
+td class=section/td
+td style=text-align:center
diff --git a/Documentation/makedocpdf.sh b/Documentation/makedocpdf.sh
new file mode 100644
index 000..fd9f5bb
--- /dev/null
+++ b/Documentation/makedocpdf.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+rm -f git-doc.pdf
+
+cat /dev/null docfiles.txt
+
+ls gittutorial.html docfiles.txt
+ls gittutorial-2.htmldocfiles.txt
+ls everyday.html docfiles.txt
+ls gitworkflows.html docfiles.txt
+ls git-*.htmldocfiles.txt
+ls git[acdghikmnr]*.html docfiles.txt
+ls gitweb*.html docfiles.txt
+ls howto-index.html docfiles.txt
+ls howto/*.html docfiles.txt
+ls technical/*.html docfiles.txt
+ls RelNotes/*.html docfiles.txt
+
+cat /dev/null footer.html
+
+cat footerstart.txt footer.html
+cat ../GIT-VERSION-FILE footer.html
+cat footerend.txt footer.html
+
+cat docfiles.txt | xargs cat | wkhtmltopdf --book --footer-html footer.html
--disable-external-links - git-doc.pdf
diff --git a/Makefile b/Makefile
index 8413606..2ddb3c9 100644
--- a/Makefile
+++ b/Makefile
@@ -2485,6 +2485,9 @@ info:
pdf:
$(MAKE) -C Documentation pdf
+fullpdf:
+ $(MAKE) -C Documentation fullpdf
+
XGETTEXT_FLAGS = \
--force-po \
--add-comments \
@@ -2796,6 +2799,9 @@ install-info:
install-pdf:
$(MAKE) -C Documentation install-pdf
+install-fullpdf:
+ $(MAKE) -C Documentation install-fullpdf
+
quick-install-doc:
$(MAKE) -C Documentation quick-install
--
1.7.11.msysgit.1
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html