diff options
author | Bill Traynor <wmat@alphatroop.com> | 2013-01-11 12:45:15 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-27 21:01:08 +0000 |
commit | 034e49004fd74d6c2bd25856382238045601fb5d (patch) | |
tree | 1512cfb7027b764ed4ce5788e6a80cee91256ed1 /bitbake/doc/Makefile | |
parent | eeb4c7164711bcdc66f7bfb90a7d253b93977bc1 (diff) | |
download | openembedded-core-contrib-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/Makefile')
-rw-r--r-- | bitbake/doc/Makefile | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/bitbake/doc/Makefile b/bitbake/doc/Makefile new file mode 100644 index 0000000000..29774e41cc --- /dev/null +++ b/bitbake/doc/Makefile @@ -0,0 +1,77 @@ +# This is a single Makefile to handle all generated BitBake documents. +# The Makefile needs to live in the documentation directory and all figures used +# in any manuals must be .PNG files and live in the individual book's figures +# directory. +# +# The Makefile has these targets: +# +# pdf: generates a PDF version of a manual. +# html: generates an HTML version of a manual. +# tarball: creates a tarball for the doc files. +# validate: validates +# clean: removes files +# +# The Makefile generates an HTML and PDF version of every document. The +# variable DOC indicates the folder name for a given manual. +# +# To build a manual, you must invoke 'make' with the DOC argument. +# +# Examples: +# +# make DOC=user-manual +# make pdf DOC=user-manual +# +# The first example generates the HTML and PDF versions of the User Manual. +# The second example generates the HTML version only of the User Manual. +# + +ifeq ($(DOC),user-manual) +XSLTOPTS = --stringparam html.stylesheet user-manual-style.css \ + --stringparam chapter.autolabel 1 \ + --stringparam section.autolabel 1 \ + --stringparam section.label.includes.component.label 1 \ + --xinclude +ALLPREQ = html pdf tarball +TARFILES = user-manual-style.css user-manual.html user-manual.pdf figures/bitbake-title.png +MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf +FIGURES = figures +STYLESHEET = $(DOC)/*.css + +endif + +## +# These URI should be rewritten by your distribution's xml catalog to +# match your localy installed XSL stylesheets. +XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current +XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl + +all: $(ALLPREQ) + +pdf: +ifeq ($(DOC),user-manual) + @echo " " + @echo "********** Building."$(DOC) + @echo " " + cd $(DOC); ../tools/docbook-to-pdf $(DOC).xml ../template; cd .. +endif + +html: +ifeq ($(DOC),user-manual) +# See http://www.sagehill.net/docbookxsl/HtmlOutput.html + @echo " " + @echo "******** Building "$(DOC) + @echo " " + cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. +endif + +tarball: html + @echo " " + @echo "******** Creating Tarball of document files" + @echo " " + cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd .. + +validate: + cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. + +clean: + rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz; |