- 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>
This commit is contained in:
parent
18d42bd84d
commit
2adfc8139e
|
@ -1,4 +1,43 @@
|
|||
DISTROVERSION=1.1
|
||||
# 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
|
||||
# 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. Not valid for the Quick Start
|
||||
# html: generates an HTML version of a manual.
|
||||
# tarball: creates a tarball for the doc files.
|
||||
# validate: validates
|
||||
# publish: pushes generated files to the Yocto Project website
|
||||
# clean: removes files
|
||||
#
|
||||
# The Makefile generates an HTML and PDF version of every document except the
|
||||
# Yocto Project Quick Start. The Quick Start is in HTML form only. The variable
|
||||
# The command-line argument DOC represents the folder name in which a particular
|
||||
# document is stored. The command-line argument VER represents the distro
|
||||
# version of the Yocto Release for which the manuals are being generated.
|
||||
# You must invoke the Makefile with the DOC and VER arguments.
|
||||
# Examples:
|
||||
#
|
||||
# make DOC=bsp-guide VER=1.1
|
||||
# make DOC=yocto-project-qs VER=1.1
|
||||
# make pdf DOC=yocto-project-qs VER=1.1
|
||||
#
|
||||
# The first example generates the HTML and PDF versions of the BSP Guide for
|
||||
# the Yocto Project 1.1 Release. The second example generates the HTML version
|
||||
# of the Quick Start. The third example generates an error because you cannot
|
||||
# generate a PDF version of the Quick Start.
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
# make publish DOC=bsp-guide VER=1.1
|
||||
# make publish DOC=adt-manual VER=1.1
|
||||
#
|
||||
|
||||
ifeq ($(DOC),bsp-guide)
|
||||
XSLTOPTS = --stringparam html.stylesheet style.css \
|
||||
--stringparam chapter.autolabel 1 \
|
||||
|
@ -7,6 +46,10 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||
--xinclude
|
||||
ALLPREQ = html pdf tarball
|
||||
TARFILES = style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(DOC),yocto-project-qs)
|
||||
|
@ -14,6 +57,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||
--xinclude
|
||||
ALLPREQ = html tarball
|
||||
TARFILES = 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
|
||||
MANUALS = $(DOC)/$(DOC).html
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
endif
|
||||
|
||||
ifeq ($(DOC),poky-ref-manual)
|
||||
|
@ -25,6 +71,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||
--xinclude
|
||||
ALLPREQ = html pdf tarball
|
||||
TARFILES = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
endif
|
||||
|
||||
|
||||
|
@ -37,6 +86,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||
--xinclude
|
||||
ALLPREQ = html pdf tarball
|
||||
TARFILES = adt-manual.html adt-manual.pdf style.css figures/adt-title.png
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
endif
|
||||
|
||||
ifeq ($(DOC),kernel-manual)
|
||||
|
@ -48,6 +100,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \
|
|||
--xinclude
|
||||
ALLPREQ = html pdf tarball
|
||||
TARFILES = kernel-manual.html kernel-manual.pdf style.css figures/kernel-title.png figures/kernel-architecture-overview.png
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = figures
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
endif
|
||||
|
||||
|
||||
|
@ -60,7 +115,13 @@ XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
|
|||
all: $(ALLPREQ)
|
||||
|
||||
pdf:
|
||||
ifeq ($(DOC),yocto-project-qs)
|
||||
@echo " "
|
||||
@echo "ERROR: You cannot generate a PDF file for the Yocto Project Quick Start"
|
||||
@echo " "
|
||||
else
|
||||
cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
|
||||
endif
|
||||
|
||||
html:
|
||||
# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
|
||||
|
@ -72,13 +133,10 @@ tarball: html
|
|||
validate:
|
||||
cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
|
||||
|
||||
MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf
|
||||
FIGURES = $(DOC)/figures/*.png
|
||||
STYLESHEET = $(DOC)/*.css
|
||||
|
||||
publish:
|
||||
scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(DISTROVERSION)/$(DOC)
|
||||
scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(DISTROVERSION)/$(DOC)/figures
|
||||
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)/figures
|
||||
|
||||
clean:
|
||||
rm -f $(MANUALS)
|
||||
|
|
Loading…
Reference in New Issue