summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2011-06-03 08:44:36 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-13 22:38:03 +0100
commit2adfc8139edebada49254fc7ef5fffc366a819d0 (patch)
tree5f414d14757a24fc1ad9abbf75ca7584750b055f /documentation
parent18d42bd84dd769f46f39fce19082af4b2e192460 (diff)
downloadpoky-2adfc8139edebada49254fc7ef5fffc366a819d0.tar.gz
- documentation/Makefile: Cleaned up Makefile
[BUGID#_1025] - I added some conditionals to handle the Yocto Project Quick Start case. This manual does not have a PDF version. I put in tests for publishing and for a case where a user might attempt to specifically generate a PDF using 'make pdf'. I also converted the version variable into a command-line argument so we don't have to edit the make file when a new release comes out. (From yocto-docs rev: 8e98871c9771096ec635f592cca752c63697bd5e) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/Makefile70
1 files changed, 64 insertions, 6 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index b19d99ef8a..d1fc1a2f85 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -1,4 +1,43 @@
1DISTROVERSION=1.1 1# This is a single Makefile to handle all generated Yocto Project documents.
2# The Makefile needs to live in the documents 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. Not valid for the Quick Start
9# html: generates an HTML version of a manual.
10# tarball: creates a tarball for the doc files.
11# validate: validates
12# publish: pushes generated files to the Yocto Project website
13# clean: removes files
14#
15# The Makefile generates an HTML and PDF version of every document except the
16# Yocto Project Quick Start. The Quick Start is in HTML form only. The variable
17# The command-line argument DOC represents the folder name in which a particular
18# document is stored. The command-line argument VER represents the distro
19# version of the Yocto Release for which the manuals are being generated.
20# You must invoke the Makefile with the DOC and VER arguments.
21# Examples:
22#
23# make DOC=bsp-guide VER=1.1
24# make DOC=yocto-project-qs VER=1.1
25# make pdf DOC=yocto-project-qs VER=1.1
26#
27# The first example generates the HTML and PDF versions of the BSP Guide for
28# the Yocto Project 1.1 Release. The second example generates the HTML version
29# of the Quick Start. The third example generates an error because you cannot
30# generate a PDF version of the Quick Start.
31#
32# Use the publish target to push the generated manuals to the Yocto Project
33# website. All files needed for the manual's HTML form are pushed as well as the
34# PDF version (if applicable).
35# Examples:
36#
37# make publish DOC=bsp-guide VER=1.1
38# make publish DOC=adt-manual VER=1.1
39#
40
2ifeq ($(DOC),bsp-guide) 41ifeq ($(DOC),bsp-guide)
3XSLTOPTS = --stringparam html.stylesheet style.css \ 42XSLTOPTS = --stringparam html.stylesheet style.css \
4 --stringparam chapter.autolabel 1 \ 43 --stringparam chapter.autolabel 1 \
@@ -7,6 +46,10 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
7 --xinclude 46 --xinclude
8ALLPREQ = html pdf tarball 47ALLPREQ = html pdf tarball
9TARFILES = style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png 48TARFILES = style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png
49MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
50FIGURES = figures
51STYLESHEET = $(DOC)/*.css
52
10endif 53endif
11 54
12ifeq ($(DOC),yocto-project-qs) 55ifeq ($(DOC),yocto-project-qs)
@@ -14,6 +57,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
14 --xinclude 57 --xinclude
15ALLPREQ = html tarball 58ALLPREQ = html tarball
16TARFILES = yocto-project-qs.html style.css figures/yocto-environment.png figures/building-an-image.png figures/using-a-pre-built-image.png figures/yocto-project-transp.png 59TARFILES = yocto-project-qs.html style.css figures/yocto-environment.png figures/building-an-image.png figures/using-a-pre-built-image.png figures/yocto-project-transp.png
60MANUALS = $(DOC)/$(DOC).html
61FIGURES = figures
62STYLESHEET = $(DOC)/*.css
17endif 63endif
18 64
19ifeq ($(DOC),poky-ref-manual) 65ifeq ($(DOC),poky-ref-manual)
@@ -25,6 +71,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
25 --xinclude 71 --xinclude
26ALLPREQ = html pdf tarball 72ALLPREQ = html pdf tarball
27TARFILES = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png 73TARFILES = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png
74MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
75FIGURES = figures
76STYLESHEET = $(DOC)/*.css
28endif 77endif
29 78
30 79
@@ -37,6 +86,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
37 --xinclude 86 --xinclude
38ALLPREQ = html pdf tarball 87ALLPREQ = html pdf tarball
39TARFILES = adt-manual.html adt-manual.pdf style.css figures/adt-title.png 88TARFILES = adt-manual.html adt-manual.pdf style.css figures/adt-title.png
89MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
90FIGURES = figures
91STYLESHEET = $(DOC)/*.css
40endif 92endif
41 93
42ifeq ($(DOC),kernel-manual) 94ifeq ($(DOC),kernel-manual)
@@ -48,6 +100,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
48 --xinclude 100 --xinclude
49ALLPREQ = html pdf tarball 101ALLPREQ = html pdf tarball
50TARFILES = kernel-manual.html kernel-manual.pdf style.css figures/kernel-title.png figures/kernel-architecture-overview.png 102TARFILES = kernel-manual.html kernel-manual.pdf style.css figures/kernel-title.png figures/kernel-architecture-overview.png
103MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
104FIGURES = figures
105STYLESHEET = $(DOC)/*.css
51endif 106endif
52 107
53 108
@@ -60,7 +115,13 @@ XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
60all: $(ALLPREQ) 115all: $(ALLPREQ)
61 116
62pdf: 117pdf:
118ifeq ($(DOC),yocto-project-qs)
119 @echo " "
120 @echo "ERROR: You cannot generate a PDF file for the Yocto Project Quick Start"
121 @echo " "
122else
63 cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd .. 123 cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
124endif
64 125
65html: 126html:
66# See http://www.sagehill.net/docbookxsl/HtmlOutput.html 127# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
@@ -72,13 +133,10 @@ tarball: html
72validate: 133validate:
73 cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. 134 cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
74 135
75MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
76FIGURES = $(DOC)/figures/*.png
77STYLESHEET = $(DOC)/*.css
78 136
79publish: 137publish:
80 scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(DISTROVERSION)/$(DOC) 138 scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
81 scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(DISTROVERSION)/$(DOC)/figures 139 cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)/figures
82 140
83clean: 141clean:
84 rm -f $(MANUALS) 142 rm -f $(MANUALS)