2011-06-03 15:44:36 +00:00
|
|
|
# This is a single Makefile to handle all generated Yocto Project documents.
|
|
|
|
# The Makefile needs to live in the documents directory and all figures used
|
2012-01-25 14:38:17 +00:00
|
|
|
# in any manuals must be .PNG files and live in the individual book's figures
|
2012-08-23 00:30:54 +00:00
|
|
|
# directory as well as in the figures directory for the mega-manual.
|
|
|
|
# Note that the figures for the Yocto Project Development Manual
|
|
|
|
# differ depending on the BRANCH being built.
|
2011-06-03 15:44:36 +00:00
|
|
|
#
|
|
|
|
# The Makefile has these targets:
|
|
|
|
#
|
2012-01-25 14:38:17 +00:00
|
|
|
# pdf: generates a PDF version of a manual. Not valid for the Quick Start
|
2012-08-23 00:30:54 +00:00
|
|
|
# or the mega-manual (single, large HTML file comprised of all
|
|
|
|
# Yocto Project manuals).
|
2012-01-25 14:38:17 +00:00
|
|
|
# html: generates an HTML version of a manual.
|
|
|
|
# tarball: creates a tarball for the doc files.
|
2011-06-03 15:44:36 +00:00
|
|
|
# validate: validates
|
2012-01-25 14:38:17 +00:00
|
|
|
# publish: pushes generated files to the Yocto Project website
|
|
|
|
# clean: removes files
|
2011-06-03 15:44:36 +00:00
|
|
|
#
|
|
|
|
# The Makefile generates an HTML and PDF version of every document except the
|
2012-08-23 00:30:54 +00:00
|
|
|
# Yocto Project Quick Start and the single, HTML mega-manual, which is comprised
|
|
|
|
# of all the individual Yocto Project manuals. These two manuals are in HTML
|
|
|
|
# form only. The variable DOC indicates the folder name for a given manual. The
|
|
|
|
# variable VER represents the distro version of the Yocto Release for which the
|
|
|
|
# manuals are being generated. The variable BRANCH is used to indicate the
|
|
|
|
# branch (edison or denzil) and is used only when DOC=dev-manual or
|
|
|
|
# DOC=mega-manual. If you do not specify a BRANCH, the default branch used
|
2012-10-04 20:12:57 +00:00
|
|
|
# will be for the latest Yocto Project release. If you build for either
|
|
|
|
# edison or denzil, you must use BRANCH. You do not need to use BRANCH for
|
|
|
|
# any release beyond denzil.
|
2012-01-25 14:38:17 +00:00
|
|
|
#
|
2012-08-23 00:30:54 +00:00
|
|
|
# To build a manual, you must invoke Makefile with the DOC argument. If you
|
|
|
|
# are going to publish the manual, then you must invoke Makefile with both the
|
2012-10-04 20:12:57 +00:00
|
|
|
# DOC and the VER argument. Furthermore, if you are building or publishing
|
|
|
|
# the edison or denzil versions of the Yocto Poject Development Manual or
|
|
|
|
# the mega-manual, you must also use the BRANCH argument.
|
2011-08-29 12:46:52 +00:00
|
|
|
#
|
2011-06-03 15:44:36 +00:00
|
|
|
# Examples:
|
|
|
|
#
|
2011-08-29 12:46:52 +00:00
|
|
|
# make DOC=bsp-guide
|
|
|
|
# make DOC=yocto-project-qs
|
|
|
|
# make pdf DOC=poky-ref-manual
|
2012-01-25 14:38:17 +00:00
|
|
|
# make DOC=dev-manual BRANCH=edison
|
2012-08-23 00:30:54 +00:00
|
|
|
# make DOC=mega-manual BRANCH=denzil
|
2011-06-03 15:44:36 +00:00
|
|
|
#
|
2011-08-29 12:46:52 +00:00
|
|
|
# The first example generates the HTML and PDF versions of the BSP Guide.
|
|
|
|
# The second example generates the HTML version only of the Quick Start. Note that
|
|
|
|
# the Quick Start only has an HTML version available. The third example generates
|
2012-01-25 14:38:17 +00:00
|
|
|
# both the PDF and HTML versions of the Yocto Project Reference Manual. The
|
2012-08-23 00:30:54 +00:00
|
|
|
# fourth example generates both the PDF and HTML 'edison' versions of the YP
|
|
|
|
# Development Manual. The last exmample generates the HTML version of the
|
|
|
|
# mega-manual and uses the 'denzil' branch when choosing figures for the
|
2012-10-04 20:12:57 +00:00
|
|
|
# tarball of figures. Any example that does not use the BRANCH argument
|
|
|
|
# builds the current version of the manual set.
|
2011-06-03 15:44:36 +00:00
|
|
|
#
|
|
|
|
# Use the publish target to push the generated manuals to the Yocto Project
|
|
|
|
# website. All files needed for the manual's HTML form are pushed as well as the
|
|
|
|
# PDF version (if applicable).
|
|
|
|
# Examples:
|
|
|
|
#
|
2012-08-23 00:30:54 +00:00
|
|
|
# make publish DOC=bsp-guide VER=1.3
|
|
|
|
# make publish DOC=adt-manual VER=1.3
|
2012-01-25 14:38:17 +00:00
|
|
|
# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
|
2012-10-04 20:12:57 +00:00
|
|
|
# make publish DOC=dev-manual VER=1.2 BRANCH=denzil
|
2011-06-03 15:44:36 +00:00
|
|
|
#
|
2012-10-04 20:12:57 +00:00
|
|
|
# The first example publishes the 1.3 version of both the PDF and HTML versions of
|
|
|
|
# the BSP Guide. The second example publishes the 1.3 version of both the PDF and
|
2012-01-25 14:38:17 +00:00
|
|
|
# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
|
2012-08-23 00:30:54 +00:00
|
|
|
# 'edison' versions of the YP Development Manual. The fourth example publishes
|
2012-10-04 20:12:57 +00:00
|
|
|
# the PDF and HTML 'denzil' versions of the YP Development Manual.
|
2011-08-29 12:46:52 +00:00
|
|
|
#
|
2011-06-03 15:44:36 +00:00
|
|
|
|
2011-06-02 17:18:35 +00:00
|
|
|
ifeq ($(DOC),bsp-guide)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet bsp-style.css \
|
2011-06-02 17:18:35 +00:00
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html pdf tarball
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = bsp-style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png
|
2011-06-03 15:44:36 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
|
|
|
FIGURES = figures
|
2011-07-15 13:19:17 +00:00
|
|
|
STYLESHEET = $(DOC)/*.css
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DOC),dev-manual)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet dev-style.css \
|
2011-07-15 13:19:17 +00:00
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html pdf tarball
|
2012-01-25 03:27:11 +00:00
|
|
|
#
|
|
|
|
# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
|
|
|
|
# message for .PNG files that are not present when building a particular branch. The
|
2012-04-26 14:46:36 +00:00
|
|
|
# list of files is all-inclusive for all branches. Note, if you don't provide a BRANCH
|
|
|
|
# option, it defaults to the latest stuff. This would be appropriate for "master" branch.
|
2012-01-25 03:27:11 +00:00
|
|
|
#
|
2012-01-25 14:38:17 +00:00
|
|
|
|
|
|
|
ifeq ($(BRANCH),edison)
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
|
2012-01-25 03:27:11 +00:00
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
2011-08-31 13:55:59 +00:00
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
2012-01-25 14:38:17 +00:00
|
|
|
figures/kernel-example-repos-edison.png \
|
2012-01-25 03:27:11 +00:00
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
2012-01-25 14:38:17 +00:00
|
|
|
figures/kernel-overview-3-edison.png \
|
2012-01-25 03:27:11 +00:00
|
|
|
figures/source-repos.png figures/yp-download.png \
|
2011-10-04 13:53:13 +00:00
|
|
|
figures/wip.png
|
2012-04-26 14:46:36 +00:00
|
|
|
else ifeq ($(BRANCH),denzil)
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
|
2012-01-25 14:38:17 +00:00
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
2012-04-27 12:08:27 +00:00
|
|
|
figures/kernel-example-repos-denzil.png \
|
2012-01-25 14:38:17 +00:00
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
2012-04-26 14:46:36 +00:00
|
|
|
figures/kernel-overview-3-denzil.png \
|
|
|
|
figures/source-repos.png figures/yp-download.png \
|
|
|
|
figures/wip.png
|
|
|
|
else
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
|
2012-04-26 14:46:36 +00:00
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
2012-10-04 20:12:57 +00:00
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
|
2012-10-19 21:24:22 +00:00
|
|
|
figures/source-repos.png figures/yp-download.png
|
2012-01-25 14:38:17 +00:00
|
|
|
endif
|
|
|
|
|
2011-07-15 13:19:17 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
|
|
|
FIGURES = figures
|
2011-06-03 15:44:36 +00:00
|
|
|
STYLESHEET = $(DOC)/*.css
|
|
|
|
|
2011-06-02 17:18:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DOC),yocto-project-qs)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet qs-style.css \
|
2011-06-02 17:18:35 +00:00
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html tarball
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = yocto-project-qs.html qs-style.css figures/yocto-environment.png figures/building-an-image.png figures/using-a-pre-built-image.png figures/yocto-project-transp.png
|
2011-06-03 15:44:36 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html
|
|
|
|
FIGURES = figures
|
|
|
|
STYLESHEET = $(DOC)/*.css
|
2011-06-02 17:18:35 +00:00
|
|
|
endif
|
|
|
|
|
2012-08-17 00:16:01 +00:00
|
|
|
ifeq ($(DOC),mega-manual)
|
|
|
|
XSLTOPTS = --stringparam html.stylesheet mega-style.css \
|
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html tarball
|
|
|
|
|
|
|
|
ifeq ($(BRANCH),edison)
|
|
|
|
TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
|
|
|
|
figures/using-a-pre-built-image.png \
|
|
|
|
figures/poky-title.png \
|
|
|
|
figures/adt-title.png figures/bsp-title.png \
|
|
|
|
figures/kernel-title.png figures/kernel-architecture-overview.png \
|
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
|
|
|
figures/kernel-example-repos-edison.png \
|
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
|
|
|
figures/kernel-overview-3-edison.png \
|
|
|
|
figures/source-repos.png figures/yp-download.png \
|
|
|
|
figures/wip.png
|
|
|
|
else ifeq ($(BRANCH),denzil)
|
|
|
|
TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
|
|
|
|
figures/using-a-pre-built-image.png \
|
|
|
|
figures/poky-title.png \
|
|
|
|
figures/adt-title.png figures/bsp-title.png \
|
|
|
|
figures/kernel-title.png figures/kernel-architecture-overview.png \
|
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
|
|
|
figures/kernel-example-repos-denzil.png \
|
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
|
|
|
figures/kernel-overview-3-denzil.png \
|
|
|
|
figures/source-repos.png figures/yp-download.png \
|
|
|
|
figures/wip.png
|
|
|
|
else
|
|
|
|
TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
|
|
|
|
figures/using-a-pre-built-image.png \
|
|
|
|
figures/poky-title.png \
|
|
|
|
figures/adt-title.png figures/bsp-title.png \
|
|
|
|
figures/kernel-title.png figures/kernel-architecture-overview.png \
|
|
|
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
|
|
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
2012-10-04 20:12:57 +00:00
|
|
|
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
|
2012-10-19 21:24:22 +00:00
|
|
|
figures/source-repos.png figures/yp-download.png
|
2012-08-17 00:16:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
MANUALS = $(DOC)/$(DOC).html
|
|
|
|
FIGURES = figures
|
|
|
|
STYLESHEET = $(DOC)/*.css
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2011-06-02 17:18:35 +00:00
|
|
|
ifeq ($(DOC),poky-ref-manual)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet ref-style.css \
|
2011-06-02 17:18:35 +00:00
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam appendix.autolabel A \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html pdf tarball
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = poky-ref-manual.html ref-style.css figures/poky-title.png
|
2011-06-03 15:44:36 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
|
|
|
FIGURES = figures
|
|
|
|
STYLESHEET = $(DOC)/*.css
|
2011-06-02 17:18:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(DOC),adt-manual)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet adt-style.css \
|
2011-06-02 17:18:35 +00:00
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam appendix.autolabel A \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html pdf tarball
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = adt-manual.html adt-manual.pdf adt-style.css figures/adt-title.png
|
2011-06-03 15:44:36 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
|
|
|
FIGURES = figures
|
|
|
|
STYLESHEET = $(DOC)/*.css
|
2011-06-02 17:18:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DOC),kernel-manual)
|
2012-08-17 00:16:01 +00:00
|
|
|
XSLTOPTS = --stringparam html.stylesheet kernel-style.css \
|
2011-06-02 17:18:35 +00:00
|
|
|
--stringparam chapter.autolabel 1 \
|
|
|
|
--stringparam appendix.autolabel A \
|
|
|
|
--stringparam section.autolabel 1 \
|
|
|
|
--stringparam section.label.includes.component.label 1 \
|
|
|
|
--xinclude
|
|
|
|
ALLPREQ = html pdf tarball
|
2012-08-17 00:16:01 +00:00
|
|
|
TARFILES = kernel-manual.html kernel-manual.pdf kernel-style.css figures/kernel-title.png figures/kernel-architecture-overview.png
|
2011-06-03 15:44:36 +00:00
|
|
|
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
|
|
|
FIGURES = figures
|
|
|
|
STYLESHEET = $(DOC)/*.css
|
2011-06-02 17:18:35 +00:00
|
|
|
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:
|
2011-06-03 15:44:36 +00:00
|
|
|
ifeq ($(DOC),yocto-project-qs)
|
|
|
|
@echo " "
|
2012-08-23 00:30:54 +00:00
|
|
|
@echo "ERROR: You cannot generate a yocto-project-qs PDF file."
|
2011-06-03 15:44:36 +00:00
|
|
|
@echo " "
|
2012-08-17 00:16:01 +00:00
|
|
|
|
|
|
|
else ifeq ($(DOC),mega-manual)
|
|
|
|
@echo " "
|
2012-08-23 00:30:54 +00:00
|
|
|
@echo "ERROR: You cannot generate a mega-manual PDF file."
|
2012-08-17 00:16:01 +00:00
|
|
|
@echo " "
|
|
|
|
|
2011-06-03 15:44:36 +00:00
|
|
|
else
|
2012-08-17 00:16:01 +00:00
|
|
|
|
2011-06-02 17:18:35 +00:00
|
|
|
cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
|
2011-06-03 15:44:36 +00:00
|
|
|
endif
|
2011-06-02 17:18:35 +00:00
|
|
|
|
|
|
|
html:
|
2012-08-23 00:30:54 +00:00
|
|
|
ifeq ($(DOC),mega-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 ..
|
|
|
|
@echo " "
|
|
|
|
@echo "******** Using mega-manual.sed to process external links"
|
|
|
|
@echo " "
|
|
|
|
cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd ..
|
|
|
|
@echo " "
|
|
|
|
@echo "******** Cleaning up transient file mega-output.html"
|
|
|
|
@echo " "
|
|
|
|
cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd ..
|
|
|
|
else
|
2011-06-02 17:18:35 +00:00
|
|
|
# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
|
2012-08-23 00:30:54 +00:00
|
|
|
@echo " "
|
|
|
|
@echo "******** Building "$(DOC)
|
|
|
|
@echo " "
|
2011-06-02 17:18:35 +00:00
|
|
|
cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
|
2012-08-23 00:30:54 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-02 17:18:35 +00:00
|
|
|
|
|
|
|
tarball: html
|
2012-08-23 00:30:54 +00:00
|
|
|
@echo " "
|
|
|
|
@echo "******** Creating Tarball of document files"
|
|
|
|
@echo " "
|
2011-06-02 17:18:35 +00:00
|
|
|
cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd ..
|
|
|
|
|
|
|
|
validate:
|
|
|
|
cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
|
|
|
|
|
|
|
|
|
|
|
|
publish:
|
2012-08-23 00:30:54 +00:00
|
|
|
@if test -f $(DOC)/$(DOC).html; \
|
|
|
|
then \
|
|
|
|
echo " "; \
|
|
|
|
echo "******** Publishing "$(DOC)".html"; \
|
|
|
|
echo " "; \
|
|
|
|
scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
|
|
|
|
cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
|
|
|
|
else \
|
|
|
|
echo " "; \
|
|
|
|
echo $(DOC)".html missing. Generate the file first then try again."; \
|
|
|
|
echo " "; \
|
|
|
|
fi
|
2011-06-02 17:18:35 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(MANUALS)
|