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 | poky-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 @@ | |||
| 1 | # This is a single Makefile to handle all generated BitBake documents. | ||
| 2 | # The Makefile needs to live in the documentation directory and all figures used | ||
| 3 | # in any manuals must be .PNG files and live in the individual book's figures | ||
| 4 | # directory. | ||
| 5 | # | ||
| 6 | # The Makefile has these targets: | ||
| 7 | # | ||
| 8 | # pdf: generates a PDF version of a manual. | ||
| 9 | # html: generates an HTML version of a manual. | ||
| 10 | # tarball: creates a tarball for the doc files. | ||
| 11 | # validate: validates | ||
| 12 | # clean: removes files | ||
| 13 | # | ||
| 14 | # The Makefile generates an HTML and PDF version of every document. The | ||
| 15 | # variable DOC indicates the folder name for a given manual. | ||
| 16 | # | ||
| 17 | # To build a manual, you must invoke 'make' with the DOC argument. | ||
| 18 | # | ||
| 19 | # Examples: | ||
| 20 | # | ||
| 21 | # make DOC=user-manual | ||
| 22 | # make pdf DOC=user-manual | ||
| 23 | # | ||
| 24 | # The first example generates the HTML and PDF versions of the User Manual. | ||
| 25 | # The second example generates the HTML version only of the User Manual. | ||
| 26 | # | ||
| 27 | |||
| 28 | ifeq ($(DOC),user-manual) | ||
| 29 | XSLTOPTS = --stringparam html.stylesheet user-manual-style.css \ | ||
| 30 | --stringparam chapter.autolabel 1 \ | ||
| 31 | --stringparam section.autolabel 1 \ | ||
| 32 | --stringparam section.label.includes.component.label 1 \ | ||
| 33 | --xinclude | ||
| 34 | ALLPREQ = html pdf tarball | ||
| 35 | TARFILES = user-manual-style.css user-manual.html user-manual.pdf figures/bitbake-title.png | ||
| 36 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
| 37 | FIGURES = figures | ||
| 38 | STYLESHEET = $(DOC)/*.css | ||
| 39 | |||
| 40 | endif | ||
| 41 | |||
| 42 | ## | ||
| 43 | # These URI should be rewritten by your distribution's xml catalog to | ||
| 44 | # match your localy installed XSL stylesheets. | ||
| 45 | XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current | ||
| 46 | XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl | ||
| 47 | |||
| 48 | all: $(ALLPREQ) | ||
| 49 | |||
| 50 | pdf: | ||
| 51 | ifeq ($(DOC),user-manual) | ||
| 52 | @echo " " | ||
| 53 | @echo "********** Building."$(DOC) | ||
| 54 | @echo " " | ||
| 55 | cd $(DOC); ../tools/docbook-to-pdf $(DOC).xml ../template; cd .. | ||
| 56 | endif | ||
| 57 | |||
| 58 | html: | ||
| 59 | ifeq ($(DOC),user-manual) | ||
| 60 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html | ||
| 61 | @echo " " | ||
| 62 | @echo "******** Building "$(DOC) | ||
| 63 | @echo " " | ||
| 64 | cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. | ||
| 65 | endif | ||
| 66 | |||
| 67 | tarball: html | ||
| 68 | @echo " " | ||
| 69 | @echo "******** Creating Tarball of document files" | ||
| 70 | @echo " " | ||
| 71 | cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd .. | ||
| 72 | |||
| 73 | validate: | ||
| 74 | cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. | ||
| 75 | |||
| 76 | clean: | ||
| 77 | rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz; | ||
