summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/Makefile90
1 files changed, 67 insertions, 23 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index 764c52b87c..ee7089aee6 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -1,12 +1,15 @@
1# This is a single Makefile to handle all generated Yocto Project documents. 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 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 3# in any manuals must be .PNG files and live in the individual book's figures
4# directory. Note that the figures for the Yocto Project Development Manual 4# directory as well as in the figures directory for the mega-manual.
5# differ between the 'master' and 'edison' branches. 5# Note that the figures for the Yocto Project Development Manual
6# differ depending on the BRANCH being built.
6# 7#
7# The Makefile has these targets: 8# The Makefile has these targets:
8# 9#
9# pdf: generates a PDF version of a manual. Not valid for the Quick Start 10# pdf: generates a PDF version of a manual. Not valid for the Quick Start
11# or the mega-manual (single, large HTML file comprised of all
12# Yocto Project manuals).
10# html: generates an HTML version of a manual. 13# html: generates an HTML version of a manual.
11# tarball: creates a tarball for the doc files. 14# tarball: creates a tarball for the doc files.
12# validate: validates 15# validate: validates
@@ -14,18 +17,20 @@
14# clean: removes files 17# clean: removes files
15# 18#
16# The Makefile generates an HTML and PDF version of every document except the 19# The Makefile generates an HTML and PDF version of every document except the
17# Yocto Project Quick Start. The Quick Start is in HTML form only. The variable 20# Yocto Project Quick Start and the single, HTML mega-manual, which is comprised
18# DOC is used to indicate the folder name for a given manual. The variable 21# of all the individual Yocto Project manuals. These two manuals are in HTML
19# VER represents the distro version of the Yocto Release for which the manuals 22# form only. The variable DOC indicates the folder name for a given manual. The
20# are being generated. The variable BRANCH is used to indicate the 'edison' 23# variable VER represents the distro version of the Yocto Release for which the
21# branch and is used only when DOC=dev-manual (making the YP Development 24# manuals are being generated. The variable BRANCH is used to indicate the
22# Manual). 25# branch (edison or denzil) and is used only when DOC=dev-manual or
26# DOC=mega-manual. If you do not specify a BRANCH, the default branch used
27# will be for the latest Yocto Project release.
23# 28#
24# To build the HTML and PDF versions of the manual you must invoke the Makefile 29# To build a manual, you must invoke Makefile with the DOC argument. If you
25# with the DOC argument. If you are going to publish the manual then you 30# are going to publish the manual, then you must invoke Makefile with both the
26# you must invoke the Makefile with both the DOC and the VER argument. 31# DOC and the VER argument. If you are building a particular version of the
27# If you are building the 'edison' version of the YP DEvelopment Manual then 32# Yocto Project Development Manual or you are building any version of the
28# you must use the DOC and BRANCH arguments. 33# mega-manual, you must use the DOC and BRANCH arguments.
29# 34#
30# Examples: 35# Examples:
31# 36#
@@ -33,29 +38,35 @@
33# make DOC=yocto-project-qs 38# make DOC=yocto-project-qs
34# make pdf DOC=poky-ref-manual 39# make pdf DOC=poky-ref-manual
35# make DOC=dev-manual BRANCH=edison 40# make DOC=dev-manual BRANCH=edison
41# make DOC=mega-manual BRANCH=denzil
36# 42#
37# The first example generates the HTML and PDF versions of the BSP Guide. 43# The first example generates the HTML and PDF versions of the BSP Guide.
38# The second example generates the HTML version only of the Quick Start. Note that 44# The second example generates the HTML version only of the Quick Start. Note that
39# the Quick Start only has an HTML version available. The third example generates 45# the Quick Start only has an HTML version available. The third example generates
40# both the PDF and HTML versions of the Yocto Project Reference Manual. The 46# both the PDF and HTML versions of the Yocto Project Reference Manual. The
41# last example generates both the PDF and HTML 'edison' versions of the YP 47# fourth example generates both the PDF and HTML 'edison' versions of the YP
42# Development Manual. 48# Development Manual. The last exmample generates the HTML version of the
49# mega-manual and uses the 'denzil' branch when choosing figures for the
50# tarball of figures.
43# 51#
44# Use the publish target to push the generated manuals to the Yocto Project 52# Use the publish target to push the generated manuals to the Yocto Project
45# website. All files needed for the manual's HTML form are pushed as well as the 53# website. All files needed for the manual's HTML form are pushed as well as the
46# PDF version (if applicable). 54# PDF version (if applicable).
47# Examples: 55# Examples:
48# 56#
49# make publish DOC=bsp-guide VER=1.2 57# make publish DOC=bsp-guide VER=1.3
50# make publish DOC=adt-manual VER=1.2 58# make publish DOC=adt-manual VER=1.3
51# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison 59# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
52# make publish DOC=dev-manual VER=1.2 60# make publish DOC=dev-manual VER=1.2
61# make publish DOC=mega-manual VER=1.3 BRANCH=denzil
53# 62#
54# The first example publishes the 1.2 version of both the PDF and HTML versions of 63# The first example publishes the 1.2 version of both the PDF and HTML versions of
55# the BSP Guide. The second example publishes the 1.2 version of both the PDF and 64# the BSP Guide. The second example publishes the 1.2 version of both the PDF and
56# HTML versions of the ADT Manual. The third example publishes the PDF and HTML 65# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
57# 'edison' versions of the YP Development Manual. Finally, the last example publishes 66# 'edison' versions of the YP Development Manual. The fourth example publishes
58# the PDF and HTML 'master' versions of the YP Development Manual. 67# the PDF and HTML 'master' versions of the YP Development Manual. The last
68# example publishes the 1.3 version of the mega-manual (HTML-only) and the
69# version generated and published is based on the 'denzil' branch.
59# 70#
60 71
61ifeq ($(DOC),bsp-guide) 72ifeq ($(DOC),bsp-guide)
@@ -241,12 +252,12 @@ all: $(ALLPREQ)
241pdf: 252pdf:
242ifeq ($(DOC),yocto-project-qs) 253ifeq ($(DOC),yocto-project-qs)
243 @echo " " 254 @echo " "
244 @echo "ERROR: You cannot generate a PDF file for the Yocto Project Quick Start" 255 @echo "ERROR: You cannot generate a yocto-project-qs PDF file."
245 @echo " " 256 @echo " "
246 257
247else ifeq ($(DOC),mega-manual) 258else ifeq ($(DOC),mega-manual)
248 @echo " " 259 @echo " "
249 @echo "ERROR: You cannot generate a PDF file for the single HTML manual" 260 @echo "ERROR: You cannot generate a mega-manual PDF file."
250 @echo " " 261 @echo " "
251 262
252else 263else
@@ -255,10 +266,33 @@ else
255endif 266endif
256 267
257html: 268html:
269ifeq ($(DOC),mega-manual)
270# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
271 @echo " "
272 @echo "******** Building "$(DOC)
273 @echo " "
274 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
275 @echo " "
276 @echo "******** Using mega-manual.sed to process external links"
277 @echo " "
278 cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd ..
279 @echo " "
280 @echo "******** Cleaning up transient file mega-output.html"
281 @echo " "
282 cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd ..
283else
258# See http://www.sagehill.net/docbookxsl/HtmlOutput.html 284# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
285 @echo " "
286 @echo "******** Building "$(DOC)
287 @echo " "
259 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. 288 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
289endif
290
260 291
261tarball: html 292tarball: html
293 @echo " "
294 @echo "******** Creating Tarball of document files"
295 @echo " "
262 cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd .. 296 cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd ..
263 297
264validate: 298validate:
@@ -266,8 +300,18 @@ validate:
266 300
267 301
268publish: 302publish:
269 scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC) 303 @if test -f $(DOC)/$(DOC).html; \
270 cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC) 304 then \
305 echo " "; \
306 echo "******** Publishing "$(DOC)".html"; \
307 echo " "; \
308 scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
309 cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
310 else \
311 echo " "; \
312 echo $(DOC)".html missing. Generate the file first then try again."; \
313 echo " "; \
314 fi
271 315
272clean: 316clean:
273 rm -f $(MANUALS) 317 rm -f $(MANUALS)