diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/Makefile | 70 |
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 @@ | |||
1 | DISTROVERSION=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 | |||
2 | ifeq ($(DOC),bsp-guide) | 41 | ifeq ($(DOC),bsp-guide) |
3 | XSLTOPTS = --stringparam html.stylesheet style.css \ | 42 | XSLTOPTS = --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 |
8 | ALLPREQ = html pdf tarball | 47 | ALLPREQ = html pdf tarball |
9 | TARFILES = style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png | 48 | TARFILES = style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png |
49 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
50 | FIGURES = figures | ||
51 | STYLESHEET = $(DOC)/*.css | ||
52 | |||
10 | endif | 53 | endif |
11 | 54 | ||
12 | ifeq ($(DOC),yocto-project-qs) | 55 | ifeq ($(DOC),yocto-project-qs) |
@@ -14,6 +57,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \ | |||
14 | --xinclude | 57 | --xinclude |
15 | ALLPREQ = html tarball | 58 | ALLPREQ = html tarball |
16 | 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 | 59 | 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 |
60 | MANUALS = $(DOC)/$(DOC).html | ||
61 | FIGURES = figures | ||
62 | STYLESHEET = $(DOC)/*.css | ||
17 | endif | 63 | endif |
18 | 64 | ||
19 | ifeq ($(DOC),poky-ref-manual) | 65 | ifeq ($(DOC),poky-ref-manual) |
@@ -25,6 +71,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \ | |||
25 | --xinclude | 71 | --xinclude |
26 | ALLPREQ = html pdf tarball | 72 | ALLPREQ = html pdf tarball |
27 | TARFILES = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png | 73 | TARFILES = poky-ref-manual.html style.css figures/poky-title.png figures/ss-sato.png |
74 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
75 | FIGURES = figures | ||
76 | STYLESHEET = $(DOC)/*.css | ||
28 | endif | 77 | endif |
29 | 78 | ||
30 | 79 | ||
@@ -37,6 +86,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \ | |||
37 | --xinclude | 86 | --xinclude |
38 | ALLPREQ = html pdf tarball | 87 | ALLPREQ = html pdf tarball |
39 | TARFILES = adt-manual.html adt-manual.pdf style.css figures/adt-title.png | 88 | TARFILES = adt-manual.html adt-manual.pdf style.css figures/adt-title.png |
89 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
90 | FIGURES = figures | ||
91 | STYLESHEET = $(DOC)/*.css | ||
40 | endif | 92 | endif |
41 | 93 | ||
42 | ifeq ($(DOC),kernel-manual) | 94 | ifeq ($(DOC),kernel-manual) |
@@ -48,6 +100,9 @@ XSLTOPTS = --stringparam html.stylesheet style.css \ | |||
48 | --xinclude | 100 | --xinclude |
49 | ALLPREQ = html pdf tarball | 101 | ALLPREQ = html pdf tarball |
50 | TARFILES = kernel-manual.html kernel-manual.pdf style.css figures/kernel-title.png figures/kernel-architecture-overview.png | 102 | TARFILES = kernel-manual.html kernel-manual.pdf style.css figures/kernel-title.png figures/kernel-architecture-overview.png |
103 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
104 | FIGURES = figures | ||
105 | STYLESHEET = $(DOC)/*.css | ||
51 | endif | 106 | endif |
52 | 107 | ||
53 | 108 | ||
@@ -60,7 +115,13 @@ XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl | |||
60 | all: $(ALLPREQ) | 115 | all: $(ALLPREQ) |
61 | 116 | ||
62 | pdf: | 117 | pdf: |
118 | ifeq ($(DOC),yocto-project-qs) | ||
119 | @echo " " | ||
120 | @echo "ERROR: You cannot generate a PDF file for the Yocto Project Quick Start" | ||
121 | @echo " " | ||
122 | else | ||
63 | cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd .. | 123 | cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd .. |
124 | endif | ||
64 | 125 | ||
65 | html: | 126 | html: |
66 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html | 127 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html |
@@ -72,13 +133,10 @@ tarball: html | |||
72 | validate: | 133 | validate: |
73 | cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. | 134 | cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. |
74 | 135 | ||
75 | MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf | ||
76 | FIGURES = $(DOC)/figures/*.png | ||
77 | STYLESHEET = $(DOC)/*.css | ||
78 | 136 | ||
79 | publish: | 137 | publish: |
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 | ||
83 | clean: | 141 | clean: |
84 | rm -f $(MANUALS) | 142 | rm -f $(MANUALS) |