summaryrefslogtreecommitdiffstats
path: root/bitbake/doc/tools
diff options
context:
space:
mode:
authorBill Traynor <wmat@alphatroop.com>2013-01-11 12:45:15 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-27 21:01:08 +0000
commit034e49004fd74d6c2bd25856382238045601fb5d (patch)
tree1512cfb7027b764ed4ce5788e6a80cee91256ed1 /bitbake/doc/tools
parenteeb4c7164711bcdc66f7bfb90a7d253b93977bc1 (diff)
downloadpoky-034e49004fd74d6c2bd25856382238045601fb5d.tar.gz
bitbake: user-manual: Import YP Docs templates for usermanual improvements
Import the necessary pieces to be able to build the BitBake User Manual using make in a similar way that the Yocto Documentation is built. The Makefile has been edited to remove Yocto Project specific content and adapt for bitbake's needs. (Bitbake rev: d4199078692f86341ed5b42a7c2dd4b34819aead) Signed-off-by: Bill Traynor <wmat@alphatroop.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/tools')
-rwxr-xr-xbitbake/doc/tools/docbook-to-pdf51
1 files changed, 51 insertions, 0 deletions
diff --git a/bitbake/doc/tools/docbook-to-pdf b/bitbake/doc/tools/docbook-to-pdf
new file mode 100755
index 0000000000..558ded9e0b
--- /dev/null
+++ b/bitbake/doc/tools/docbook-to-pdf
@@ -0,0 +1,51 @@
1#!/bin/sh
2
3if [ -z "$1" -o -z "$2" ]; then
4 echo "usage: [-v] $0 <docbook file> <templatedir>"
5 echo
6 echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
7 echo " installed for this to work!"
8 echo
9 exit 0
10fi
11
12FO=`echo $1 | sed s/.xml/.fo/` || exit 1
13PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1
14TEMPLATEDIR=$2
15
16##
17# These URI should be rewritten by your distribution's xml catalog to
18# match your localy installed XSL stylesheets.
19XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current"
20
21# Creates a temporary XSL stylesheet based on titlepage.xsl
22xsltproc -o /tmp/titlepage.xsl \
23 --xinclude \
24 $XSL_BASE_URI/template/titlepage.xsl \
25 $TEMPLATEDIR/titlepage.templates.xml || exit 1
26
27# Creates the file needed for FOP
28xsltproc --xinclude \
29 --stringparam hyphenate false \
30 --stringparam formal.title.placement "figure after" \
31 --stringparam ulink.show 1 \
32 --stringparam body.font.master 9 \
33 --stringparam title.font.master 11 \
34 --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \
35 --stringparam chapter.autolabel 1 \
36 --stringparam appendix.autolabel A \
37 --stringparam section.autolabel 1 \
38 --stringparam section.label.includes.component.label 1 \
39 --output $FO \
40 $TEMPLATEDIR/db-pdf.xsl \
41 $1 || exit 1
42
43# Invokes the Java version of FOP. Uses the additional configuration file common/fop-config.xml
44fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1
45
46rm -f $FO
47rm -f /tmp/titlepage.xsl
48
49echo
50echo " #### Success! $PDF ready. ####"
51echo