Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # This is a single Makefile to handle all generated Yocto Project documents, |
| 2 | # which includes the BitBake User Manual and the Toaster User Manual. |
| 3 | # The Makefile needs to live in the documents directory and all figures used |
| 4 | # in any manuals must be .PNG files and live in the individual book's figures |
| 5 | # directory as well as in the figures directory for the mega-manual. |
| 6 | # |
| 7 | # Some manuals are available as linked help through the Eclipse development |
| 8 | # system. These manuals also include an "eclipse" sub-directory as part of |
| 9 | # the make process. |
| 10 | # |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | # Note that the figures for the Yocto Project Development Tasks Manual |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | # differ depending on the BRANCH being built. |
| 13 | # |
| 14 | # The Makefile has these targets: |
| 15 | # all: If you leave off the target then "all" is implied. |
| 16 | # You will generate HTML, eclipse help (if applicable), |
| 17 | # and a tarball of files. |
| 18 | # |
| 19 | # pdf: generates a PDF version of a manual. Not valid for the |
| 20 | # Quick Start or the mega-manual (single, large HTML file |
| 21 | # comprised of all Yocto Project manuals). |
| 22 | # html: generates an HTML version of a manual. |
| 23 | # eclipse: generates an HTML version of a manual that can be used as |
| 24 | # eclipse help (including necessary metadata files). |
| 25 | # tarball: creates a tarball for the doc files. |
| 26 | # validate: validates |
| 27 | # publish: pushes generated files to the Yocto Project website |
| 28 | # clean: removes files |
| 29 | # |
| 30 | # The Makefile can generate an HTML and PDF version of every document except the |
| 31 | # Yocto Project Quick Start and the single, HTML mega-manual, which is comprised |
| 32 | # of all the individual Yocto Project manuals. You can generate these two manuals |
| 33 | # in HTML form only. The variable DOC indicates the folder name for a given manual. |
| 34 | # The variable VER represents the distro version of the Yocto Release for which the |
| 35 | # manuals are being generated. The variable BRANCH is used to indicate the |
| 36 | # branch (edison or denzil) and is used only when DOC=dev-manual or |
| 37 | # DOC=mega-manual. If you do not specify a BRANCH, the default branch used |
| 38 | # will be for the latest Yocto Project release. If you build for either |
| 39 | # edison or denzil, you must use BRANCH. You do not need to use BRANCH for |
| 40 | # any release beyond denzil. |
| 41 | # |
| 42 | # To build a manual, you must invoke Makefile with the DOC argument. If you |
| 43 | # are going to publish the manual, then you must invoke Makefile with both the |
| 44 | # DOC and the VER argument. Furthermore, if you are building or publishing |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 45 | # the edison or denzil versions of the Yocto Project Development Tasks Manual or |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | # the mega-manual, you must also use the BRANCH argument. |
| 47 | # |
| 48 | # Examples: |
| 49 | # |
| 50 | # make DOC=bsp-guide |
| 51 | # make html DOC=yocto-project-qs |
| 52 | # make pdf DOC=ref-manual |
| 53 | # make DOC=dev-manual BRANCH=edison |
| 54 | # make DOC=mega-manual BRANCH=denzil |
| 55 | # |
| 56 | # The first example generates the HTML and Eclipse help versions of the BSP Guide. |
| 57 | # The second example generates the HTML version only of the Quick Start. Note |
| 58 | # that the Quick Start only has an HTML version available. So, the |
| 59 | # 'make DOC=yocto-project-qs' command would be equivalent. The third example |
| 60 | # generates just the PDF version of the Yocto Project Reference Manual. |
| 61 | # The fourth example generates the HTML 'edison' version and (if available) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 62 | # the Eclipse help version of the YP Development Tasks Manual. The last example |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 63 | # generates the HTML version of the mega-manual and uses the 'denzil' |
| 64 | # branch when choosing figures for the tarball of figures. Any example that does |
| 65 | # not use the BRANCH argument builds the current version of the manual set. |
| 66 | # |
| 67 | # The publish target pushes the generated manuals to the Yocto Project |
| 68 | # website. Unless you are a developer on the YP team, you will not succeed in |
| 69 | # pushing manuals to this server. All files needed for the manual's HTML form are |
| 70 | # pushed as well as applicable Eclipse versions. |
| 71 | # |
| 72 | # Examples: |
| 73 | # |
| 74 | # make publish DOC=bsp-guide VER=1.7 |
| 75 | # make publish DOC=adt-manual VER=1.6 |
| 76 | # make publish DOC=dev-manual VER=1.1.1 BRANCH=edison |
| 77 | # make publish DOC=dev-manual VER=1.2 BRANCH=denzil |
| 78 | # |
| 79 | # The first example publishes the 1.7 version of both the PDF and HTML versions of |
| 80 | # the BSP Guide. The second example publishes the 1.6 version of both the PDF and |
| 81 | # HTML versions of the ADT Manual. The third example publishes the 1.1.1 version of |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 82 | # the PDF and HTML YP Development Tasks Manual for the 'edison' branch. The fourth |
| 83 | # example publishes the 1.2 version of the PDF and HTML YP Development Tasks Manual |
| 84 | # for the 'denzil' branch. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | # |
| 86 | |
| 87 | ifeq ($(DOC),bsp-guide) |
| 88 | XSLTOPTS = --xinclude |
| 89 | ALLPREQ = html eclipse tarball |
| 90 | TARFILES = bsp-style.css bsp-guide.html figures/bsp-title.png \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 91 | figures/bsp-dev-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 92 | eclipse |
| 93 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 94 | FIGURES = figures |
| 95 | STYLESHEET = $(DOC)/*.css |
| 96 | |
| 97 | endif |
| 98 | |
| 99 | ifeq ($(DOC),dev-manual) |
| 100 | XSLTOPTS = --xinclude |
| 101 | ALLPREQ = html eclipse tarball |
| 102 | # |
| 103 | # Note that the tarfile might produce the "Cannot stat: No such file or |
| 104 | # directory" error message for .PNG files that are not present when building |
| 105 | # a particular branch. The list of files is all-inclusive for all branches. |
| 106 | # Note, if you don't provide a BRANCH option, it defaults to the latest stuff. |
| 107 | # This would be appropriate for "master" branch. |
| 108 | # |
| 109 | |
| 110 | ifeq ($(BRANCH),edison) |
| 111 | TARFILES = dev-style.css dev-manual.html \ |
| 112 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 113 | figures/dev-title.png figures/git-workflow.png \ |
| 114 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 115 | figures/kernel-example-repos-edison.png \ |
| 116 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 117 | figures/kernel-overview-3-edison.png \ |
| 118 | figures/source-repos.png figures/yp-download.png \ |
| 119 | figures/wip.png |
| 120 | else ifeq ($(BRANCH),denzil) |
| 121 | TARFILES = dev-style.css dev-manual.html \ |
| 122 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 123 | figures/dev-title.png figures/git-workflow.png \ |
| 124 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 125 | figures/kernel-example-repos-denzil.png \ |
| 126 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 127 | figures/kernel-overview-3-denzil.png \ |
| 128 | figures/source-repos.png figures/yp-download.png \ |
| 129 | figures/wip.png |
| 130 | else |
| 131 | TARFILES = dev-style.css dev-manual.html \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 132 | figures/dev-title.png \ |
| 133 | figures/recipe-workflow.png figures/bitbake-build-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 134 | eclipse |
| 135 | endif |
| 136 | |
| 137 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 138 | FIGURES = figures |
| 139 | STYLESHEET = $(DOC)/*.css |
| 140 | |
| 141 | endif |
| 142 | |
| 143 | ifeq ($(DOC),yocto-project-qs) |
| 144 | XSLTOPTS = --xinclude |
| 145 | ALLPREQ = html eclipse tarball |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 146 | TARFILES = yocto-project-qs.html qs-style.css \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 147 | figures/yocto-project-transp.png \ |
| 148 | eclipse |
| 149 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 150 | FIGURES = figures |
| 151 | STYLESHEET = $(DOC)/*.css |
| 152 | endif |
| 153 | |
| 154 | ifeq ($(DOC),mega-manual) |
| 155 | XSLTOPTS = --stringparam html.stylesheet mega-style.css \ |
| 156 | --stringparam chapter.autolabel 1 \ |
| 157 | --stringparam section.autolabel 1 \ |
| 158 | --stringparam section.label.includes.component.label 1 \ |
| 159 | --xinclude |
| 160 | ALLPREQ = html tarball |
| 161 | |
| 162 | ifeq ($(BRANCH),edison) |
| 163 | TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ |
| 164 | figures/building-an-image.png \ |
| 165 | figures/using-a-pre-built-image.png \ |
| 166 | figures/poky-title.png \ |
| 167 | figures/adt-title.png figures/bsp-title.png \ |
| 168 | figures/kernel-title.png figures/kernel-architecture-overview.png \ |
| 169 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 170 | figures/dev-title.png figures/git-workflow.png \ |
| 171 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 172 | figures/kernel-example-repos-edison.png \ |
| 173 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 174 | figures/kernel-overview-3-edison.png \ |
| 175 | figures/source-repos.png figures/yp-download.png \ |
| 176 | figures/wip.png |
| 177 | else ifeq ($(BRANCH),denzil) |
| 178 | TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ |
| 179 | figures/building-an-image.png \ |
| 180 | figures/using-a-pre-built-image.png \ |
| 181 | figures/poky-title.png \ |
| 182 | figures/adt-title.png figures/bsp-title.png \ |
| 183 | figures/kernel-title.png figures/kernel-architecture-overview.png \ |
| 184 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 185 | figures/dev-title.png figures/git-workflow.png \ |
| 186 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 187 | figures/kernel-example-repos-denzil.png \ |
| 188 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 189 | figures/kernel-overview-3-denzil.png \ |
| 190 | figures/source-repos.png figures/yp-download.png \ |
| 191 | figures/wip.png |
| 192 | else |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 193 | TARFILES = mega-manual.html mega-style.css \ |
| 194 | figures/building-an-image.png figures/YP-flow-diagram.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 195 | figures/using-a-pre-built-image.png \ |
| 196 | figures/poky-title.png figures/buildhistory.png \ |
| 197 | figures/buildhistory-web.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 198 | figures/sdk-title.png figures/bsp-title.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 199 | figures/kernel-dev-title.png figures/kernel-architecture-overview.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 200 | figures/bsp-dev-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 201 | figures/dev-title.png \ |
| 202 | figures/git-workflow.png figures/index-downloads.png \ |
| 203 | figures/kernel-dev-flow.png \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 204 | figures/kernel-overview-2-generic.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 205 | figures/source-repos.png figures/yp-download.png \ |
| 206 | figures/profile-title.png figures/kernelshark-all.png \ |
| 207 | figures/kernelshark-choose-events.png \ |
| 208 | figures/kernelshark-i915-display.png \ |
| 209 | figures/kernelshark-output-display.png figures/lttngmain0.png \ |
| 210 | figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \ |
| 211 | figures/oprofileui-downloading.png figures/oprofileui-processes.png \ |
| 212 | figures/perf-probe-do_fork-profile.png \ |
| 213 | figures/perf-report-cycles-u.png \ |
| 214 | figures/perf-systemwide.png figures/perf-systemwide-libc.png \ |
| 215 | figures/perf-wget-busybox-annotate-menu.png \ |
| 216 | figures/perf-wget-busybox-annotate-udhcpc.png \ |
| 217 | figures/perf-wget-busybox-debuginfo.png \ |
| 218 | figures/perf-wget-busybox-dso-zoom.png \ |
| 219 | figures/perf-wget-busybox-dso-zoom-menu.png \ |
| 220 | figures/perf-wget-busybox-expanded-stripped.png \ |
| 221 | figures/perf-wget-flat-stripped.png \ |
| 222 | figures/perf-wget-g-copy-from-user-expanded-stripped.png \ |
| 223 | figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \ |
| 224 | figures/perf-wget-g-copy-to-user-expanded-stripped.png \ |
| 225 | figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \ |
| 226 | figures/pybootchartgui-linux-yocto.png \ |
| 227 | figures/pychart-linux-yocto-rpm.png \ |
| 228 | figures/pychart-linux-yocto-rpm-nostrip.png \ |
| 229 | figures/sched-wakeup-profile.png figures/sysprof-callers.png \ |
| 230 | figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \ |
| 231 | figures/cross-development-toolchains.png \ |
| 232 | figures/yocto-environment-ref.png figures/user-configuration.png \ |
| 233 | figures/source-input.png figures/package-feeds.png \ |
| 234 | figures/layer-input.png figures/images.png figures/sdk.png \ |
| 235 | figures/source-fetching.png figures/patching.png \ |
| 236 | figures/configuration-compile-autoreconf.png \ |
| 237 | figures/analysis-for-package-splitting.png \ |
| 238 | figures/image-generation.png \ |
| 239 | figures/sdk-generation.png figures/recipe-workflow.png \ |
| 240 | figures/build-workspace-directory.png figures/mega-title.png \ |
| 241 | figures/toaster-title.png figures/hosted-service.png \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 242 | figures/simple-configuration.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 243 | figures/compatible-layers.png figures/import-layer.png figures/new-project.png \ |
| 244 | figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \ |
| 245 | figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 246 | figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 247 | figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 248 | endif |
| 249 | |
| 250 | MANUALS = $(DOC)/$(DOC).html |
| 251 | FIGURES = figures |
| 252 | STYLESHEET = $(DOC)/*.css |
| 253 | |
| 254 | endif |
| 255 | |
| 256 | ifeq ($(DOC),ref-manual) |
| 257 | XSLTOPTS = --xinclude |
| 258 | ALLPREQ = html eclipse tarball |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 259 | TARFILES = ref-manual.html ref-style.css figures/poky-title.png figures/YP-flow-diagram.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 260 | figures/buildhistory.png figures/buildhistory-web.png eclipse \ |
| 261 | figures/cross-development-toolchains.png figures/layer-input.png \ |
| 262 | figures/package-feeds.png figures/source-input.png \ |
| 263 | figures/user-configuration.png figures/yocto-environment-ref.png \ |
| 264 | figures/images.png figures/sdk.png figures/source-fetching.png \ |
| 265 | figures/patching.png figures/configuration-compile-autoreconf.png \ |
| 266 | figures/analysis-for-package-splitting.png figures/image-generation.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 267 | figures/sdk-generation.png figures/building-an-image.png \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 268 | figures/build-workspace-directory.png figures/source-repos.png \ |
| 269 | figures/index-downloads.png figures/yp-download.png figures/git-workflow.png |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 270 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 271 | FIGURES = figures |
| 272 | STYLESHEET = $(DOC)/*.css |
| 273 | endif |
| 274 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 275 | ifeq ($(DOC),sdk-manual) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 276 | XSLTOPTS = --xinclude |
| 277 | ALLPREQ = html eclipse tarball |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 278 | TARFILES = sdk-manual.html sdk-style.css figures/sdk-title.png \ |
| 279 | figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \ |
| 280 | figures/sdk-installed-extensible-sdk-directory.png figures/sdk-devtool-add-flow.png \ |
| 281 | figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 282 | figures/sdk-devtool-upgrade-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 283 | eclipse |
| 284 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 285 | FIGURES = figures |
| 286 | STYLESHEET = $(DOC)/*.css |
| 287 | endif |
| 288 | |
| 289 | ifeq ($(DOC),profile-manual) |
| 290 | XSLTOPTS = --xinclude |
| 291 | ALLPREQ = html eclipse tarball |
| 292 | TARFILES = profile-manual.html profile-manual-style.css \ |
| 293 | figures/profile-title.png figures/kernelshark-all.png \ |
| 294 | figures/kernelshark-choose-events.png \ |
| 295 | figures/kernelshark-i915-display.png \ |
| 296 | figures/kernelshark-output-display.png figures/lttngmain0.png \ |
| 297 | figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \ |
| 298 | figures/oprofileui-downloading.png figures/oprofileui-processes.png \ |
| 299 | figures/perf-probe-do_fork-profile.png \ |
| 300 | figures/perf-report-cycles-u.png \ |
| 301 | figures/perf-systemwide.png figures/perf-systemwide-libc.png \ |
| 302 | figures/perf-wget-busybox-annotate-menu.png \ |
| 303 | figures/perf-wget-busybox-annotate-udhcpc.png \ |
| 304 | figures/perf-wget-busybox-debuginfo.png \ |
| 305 | figures/perf-wget-busybox-dso-zoom.png \ |
| 306 | figures/perf-wget-busybox-dso-zoom-menu.png \ |
| 307 | figures/perf-wget-busybox-expanded-stripped.png \ |
| 308 | figures/perf-wget-flat-stripped.png \ |
| 309 | figures/perf-wget-g-copy-from-user-expanded-stripped.png \ |
| 310 | figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \ |
| 311 | figures/perf-wget-g-copy-to-user-expanded-stripped.png \ |
| 312 | figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \ |
| 313 | figures/pybootchartgui-linux-yocto.png \ |
| 314 | figures/pychart-linux-yocto-rpm.png \ |
| 315 | figures/pychart-linux-yocto-rpm-nostrip.png \ |
| 316 | figures/sched-wakeup-profile.png figures/sysprof-callers.png \ |
| 317 | figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \ |
| 318 | eclipse |
| 319 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 320 | FIGURES = figures |
| 321 | STYLESHEET = $(DOC)/*.css |
| 322 | endif |
| 323 | |
| 324 | ifeq ($(DOC),kernel-dev) |
| 325 | XSLTOPTS = --xinclude |
| 326 | ALLPREQ = html eclipse tarball |
| 327 | TARFILES = kernel-dev.html kernel-dev-style.css \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 328 | figures/kernel-dev-title.png figures/kernel-overview-2-generic.png \ |
| 329 | figures/kernel-architecture-overview.png figures/kernel-dev-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 330 | eclipse |
| 331 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 332 | FIGURES = figures |
| 333 | STYLESHEET = $(DOC)/*.css |
| 334 | endif |
| 335 | |
| 336 | ifeq ($(DOC),toaster-manual) |
| 337 | XSLTOPTS = --xinclude |
| 338 | ALLPREQ = html tarball |
| 339 | TARFILES = toaster-manual.html toaster-manual-style.css \ |
| 340 | figures/toaster-title.png figures/simple-configuration.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 341 | figures/hosted-service.png \ |
| 342 | figures/compatible-layers.png figures/import-layer.png figures/new-project.png |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 343 | MANUALS = $(DOC)/$(DOC).html |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 344 | FIGURES = figures |
| 345 | STYLESHEET = $(DOC)/*.css |
| 346 | endif |
| 347 | |
| 348 | |
| 349 | ## |
| 350 | # These URI should be rewritten by your distribution's xml catalog to |
| 351 | # match your locally installed XSL stylesheets. |
| 352 | XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/1.76.1 |
| 353 | XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl |
| 354 | |
| 355 | all: $(ALLPREQ) |
| 356 | |
| 357 | pdf: |
| 358 | ifeq ($(DOC),yocto-project-qs) |
| 359 | @echo " " |
| 360 | @echo "ERROR: You cannot generate a yocto-project-qs PDF file." |
| 361 | @echo " " |
| 362 | |
| 363 | else ifeq ($(DOC),mega-manual) |
| 364 | @echo " " |
| 365 | @echo "ERROR: You cannot generate a mega-manual PDF file." |
| 366 | @echo " " |
| 367 | |
| 368 | else |
| 369 | |
| 370 | cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd .. |
| 371 | endif |
| 372 | |
| 373 | html: |
| 374 | ifeq ($(DOC),mega-manual) |
| 375 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html |
| 376 | @echo " " |
| 377 | @echo "******** Building "$(DOC) |
| 378 | @echo " " |
| 379 | cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. |
| 380 | @echo " " |
| 381 | @echo "******** Using mega-manual.sed to process external links" |
| 382 | @echo " " |
| 383 | cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd .. |
| 384 | @echo " " |
| 385 | @echo "******** Cleaning up transient file mega-output.html" |
| 386 | @echo " " |
| 387 | cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd .. |
| 388 | else |
| 389 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html |
| 390 | @echo " " |
| 391 | @echo "******** Building "$(DOC) |
| 392 | @echo " " |
| 393 | cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. |
| 394 | endif |
| 395 | |
| 396 | |
| 397 | eclipse: BASE_DIR = html/$(DOC)/ |
| 398 | |
| 399 | eclipse: eclipse-generate eclipse-resolve-links |
| 400 | |
| 401 | .PHONY : eclipse-generate eclipse-resolve-links |
| 402 | |
| 403 | eclipse-generate: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 404 | ifeq ($(filter $(DOC), sdk-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual yocto-project-qs),) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 405 | @echo " " |
| 406 | @echo "ERROR: You can only create eclipse documentation" |
| 407 | @echo " of the following documentation parts:" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 408 | @echo " - sdk-manual" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 409 | @echo " - bsp-guide" |
| 410 | @echo " - dev-manual" |
| 411 | @echo " - kernel-dev" |
| 412 | @echo " - profile-manual" |
| 413 | @echo " - ref-manual" |
| 414 | @echo " - yocto-project-qs" |
| 415 | @echo " " |
| 416 | else |
| 417 | @echo " " |
| 418 | @echo "******** Building eclipse help of "$(DOC) |
| 419 | @echo " " |
| 420 | cd $(DOC) && \ |
| 421 | xsltproc $(XSLTOPTS) \ |
| 422 | --stringparam base.dir '$(BASE_DIR)' \ |
| 423 | -o eclipse/$(DOC).html \ |
| 424 | $(DOC)-eclipse-customization.xsl $(DOC).xml && \ |
| 425 | mv eclipse/toc.xml eclipse/$(DOC)-toc.xml && \ |
| 426 | cp -rf $(FIGURES) eclipse/$(BASE_DIR) && \ |
| 427 | cd ..; |
| 428 | |
| 429 | $(call modify-eclipse) |
| 430 | endif |
| 431 | |
| 432 | eclipse-resolve-links: |
| 433 | @echo " " |
| 434 | @echo "******** Using eclipse-help.sed to process external links" |
| 435 | @echo " " |
| 436 | $(foreach FILE, \ |
| 437 | $(wildcard $(DOC)/eclipse/html/$(DOC)/*.html), \ |
| 438 | $(shell sed -i -f tools/eclipse-help.sed $(FILE))) |
| 439 | |
| 440 | tarball: html |
| 441 | @echo " " |
| 442 | @echo "******** Creating Tarball of document files" |
| 443 | @echo " " |
| 444 | cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd .. |
| 445 | |
| 446 | validate: |
| 447 | cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. |
| 448 | |
| 449 | |
| 450 | publish: |
| 451 | @if test -f $(DOC)/$(DOC).html; \ |
| 452 | then \ |
| 453 | echo " "; \ |
| 454 | echo "******** Publishing "$(DOC)".html"; \ |
| 455 | echo " "; \ |
| 456 | scp -r $(MANUALS) $(STYLESHEET) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \ |
| 457 | cd $(DOC); scp -r $(FIGURES) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \ |
| 458 | else \ |
| 459 | echo " "; \ |
| 460 | echo $(DOC)".html missing. Generate the file first then try again."; \ |
| 461 | echo " "; \ |
| 462 | fi |
| 463 | |
| 464 | clean: |
| 465 | rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz; |