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 | # |
| 11 | # Note that the figures for the Yocto Project Development Manual |
| 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 |
| 45 | # the edison or denzil versions of the Yocto Project Development Manual or |
| 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) |
| 62 | # the Eclipse help version of the YP Development Manual. The last example |
| 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 |
| 82 | # the PDF and HTML YP Development Manual for the 'edison' branch. The fourth example |
| 83 | # publishes the 1.2 version of the PDF and HTML YP Development Manual for the |
| 84 | # 'denzil' branch. |
| 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 \ |
| 91 | eclipse |
| 92 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 93 | FIGURES = figures |
| 94 | STYLESHEET = $(DOC)/*.css |
| 95 | |
| 96 | endif |
| 97 | |
| 98 | ifeq ($(DOC),dev-manual) |
| 99 | XSLTOPTS = --xinclude |
| 100 | ALLPREQ = html eclipse tarball |
| 101 | # |
| 102 | # Note that the tarfile might produce the "Cannot stat: No such file or |
| 103 | # directory" error message for .PNG files that are not present when building |
| 104 | # a particular branch. The list of files is all-inclusive for all branches. |
| 105 | # Note, if you don't provide a BRANCH option, it defaults to the latest stuff. |
| 106 | # This would be appropriate for "master" branch. |
| 107 | # |
| 108 | |
| 109 | ifeq ($(BRANCH),edison) |
| 110 | TARFILES = dev-style.css dev-manual.html \ |
| 111 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 112 | figures/dev-title.png figures/git-workflow.png \ |
| 113 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 114 | figures/kernel-example-repos-edison.png \ |
| 115 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 116 | figures/kernel-overview-3-edison.png \ |
| 117 | figures/source-repos.png figures/yp-download.png \ |
| 118 | figures/wip.png |
| 119 | else ifeq ($(BRANCH),denzil) |
| 120 | TARFILES = dev-style.css dev-manual.html \ |
| 121 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 122 | figures/dev-title.png figures/git-workflow.png \ |
| 123 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 124 | figures/kernel-example-repos-denzil.png \ |
| 125 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 126 | figures/kernel-overview-3-denzil.png \ |
| 127 | figures/source-repos.png figures/yp-download.png \ |
| 128 | figures/wip.png |
| 129 | else |
| 130 | TARFILES = dev-style.css dev-manual.html \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 131 | figures/bsp-dev-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 132 | figures/dev-title.png figures/git-workflow.png \ |
| 133 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 134 | figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \ |
| 135 | figures/source-repos.png figures/yp-download.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 136 | figures/recipe-workflow.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 137 | figures/devtool-add-flow.png figures/devtool-modify-flow.png \ |
| 138 | figures/devtool-upgrade-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 139 | eclipse |
| 140 | endif |
| 141 | |
| 142 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 143 | FIGURES = figures |
| 144 | STYLESHEET = $(DOC)/*.css |
| 145 | |
| 146 | endif |
| 147 | |
| 148 | ifeq ($(DOC),yocto-project-qs) |
| 149 | XSLTOPTS = --xinclude |
| 150 | ALLPREQ = html eclipse tarball |
| 151 | TARFILES = yocto-project-qs.html qs-style.css figures/yocto-environment.png \ |
| 152 | figures/yocto-project-transp.png \ |
| 153 | eclipse |
| 154 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 155 | FIGURES = figures |
| 156 | STYLESHEET = $(DOC)/*.css |
| 157 | endif |
| 158 | |
| 159 | ifeq ($(DOC),mega-manual) |
| 160 | XSLTOPTS = --stringparam html.stylesheet mega-style.css \ |
| 161 | --stringparam chapter.autolabel 1 \ |
| 162 | --stringparam section.autolabel 1 \ |
| 163 | --stringparam section.label.includes.component.label 1 \ |
| 164 | --xinclude |
| 165 | ALLPREQ = html tarball |
| 166 | |
| 167 | ifeq ($(BRANCH),edison) |
| 168 | TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ |
| 169 | figures/building-an-image.png \ |
| 170 | figures/using-a-pre-built-image.png \ |
| 171 | figures/poky-title.png \ |
| 172 | figures/adt-title.png figures/bsp-title.png \ |
| 173 | figures/kernel-title.png figures/kernel-architecture-overview.png \ |
| 174 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 175 | figures/dev-title.png figures/git-workflow.png \ |
| 176 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 177 | figures/kernel-example-repos-edison.png \ |
| 178 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 179 | figures/kernel-overview-3-edison.png \ |
| 180 | figures/source-repos.png figures/yp-download.png \ |
| 181 | figures/wip.png |
| 182 | else ifeq ($(BRANCH),denzil) |
| 183 | TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ |
| 184 | figures/building-an-image.png \ |
| 185 | figures/using-a-pre-built-image.png \ |
| 186 | figures/poky-title.png \ |
| 187 | figures/adt-title.png figures/bsp-title.png \ |
| 188 | figures/kernel-title.png figures/kernel-architecture-overview.png \ |
| 189 | figures/app-dev-flow.png figures/bsp-dev-flow.png \ |
| 190 | figures/dev-title.png figures/git-workflow.png \ |
| 191 | figures/index-downloads.png figures/kernel-dev-flow.png \ |
| 192 | figures/kernel-example-repos-denzil.png \ |
| 193 | figures/kernel-overview-1.png figures/kernel-overview-2.png \ |
| 194 | figures/kernel-overview-3-denzil.png \ |
| 195 | figures/source-repos.png figures/yp-download.png \ |
| 196 | figures/wip.png |
| 197 | else |
| 198 | TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ |
| 199 | figures/building-an-image.png \ |
| 200 | figures/using-a-pre-built-image.png \ |
| 201 | figures/poky-title.png figures/buildhistory.png \ |
| 202 | figures/buildhistory-web.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 203 | figures/sdk-title.png figures/bsp-title.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 204 | figures/kernel-dev-title.png figures/kernel-architecture-overview.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 205 | figures/bsp-dev-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | figures/dev-title.png \ |
| 207 | figures/git-workflow.png figures/index-downloads.png \ |
| 208 | figures/kernel-dev-flow.png \ |
| 209 | figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \ |
| 210 | figures/source-repos.png figures/yp-download.png \ |
| 211 | figures/profile-title.png figures/kernelshark-all.png \ |
| 212 | figures/kernelshark-choose-events.png \ |
| 213 | figures/kernelshark-i915-display.png \ |
| 214 | figures/kernelshark-output-display.png figures/lttngmain0.png \ |
| 215 | figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \ |
| 216 | figures/oprofileui-downloading.png figures/oprofileui-processes.png \ |
| 217 | figures/perf-probe-do_fork-profile.png \ |
| 218 | figures/perf-report-cycles-u.png \ |
| 219 | figures/perf-systemwide.png figures/perf-systemwide-libc.png \ |
| 220 | figures/perf-wget-busybox-annotate-menu.png \ |
| 221 | figures/perf-wget-busybox-annotate-udhcpc.png \ |
| 222 | figures/perf-wget-busybox-debuginfo.png \ |
| 223 | figures/perf-wget-busybox-dso-zoom.png \ |
| 224 | figures/perf-wget-busybox-dso-zoom-menu.png \ |
| 225 | figures/perf-wget-busybox-expanded-stripped.png \ |
| 226 | figures/perf-wget-flat-stripped.png \ |
| 227 | figures/perf-wget-g-copy-from-user-expanded-stripped.png \ |
| 228 | figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \ |
| 229 | figures/perf-wget-g-copy-to-user-expanded-stripped.png \ |
| 230 | figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \ |
| 231 | figures/pybootchartgui-linux-yocto.png \ |
| 232 | figures/pychart-linux-yocto-rpm.png \ |
| 233 | figures/pychart-linux-yocto-rpm-nostrip.png \ |
| 234 | figures/sched-wakeup-profile.png figures/sysprof-callers.png \ |
| 235 | figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \ |
| 236 | figures/cross-development-toolchains.png \ |
| 237 | figures/yocto-environment-ref.png figures/user-configuration.png \ |
| 238 | figures/source-input.png figures/package-feeds.png \ |
| 239 | figures/layer-input.png figures/images.png figures/sdk.png \ |
| 240 | figures/source-fetching.png figures/patching.png \ |
| 241 | figures/configuration-compile-autoreconf.png \ |
| 242 | figures/analysis-for-package-splitting.png \ |
| 243 | figures/image-generation.png \ |
| 244 | figures/sdk-generation.png figures/recipe-workflow.png \ |
| 245 | figures/build-workspace-directory.png figures/mega-title.png \ |
| 246 | figures/toaster-title.png figures/hosted-service.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 247 | figures/simple-configuration.png figures/devtool-add-flow.png \ |
| 248 | figures/devtool-modify-flow.png figures/devtool-upgrade-flow.png \ |
| 249 | figures/compatible-layers.png figures/import-layer.png figures/new-project.png \ |
| 250 | figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \ |
| 251 | 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] | 252 | figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \ |
| 253 | figures/sdk-devtool-upgrade-flow.png |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 254 | endif |
| 255 | |
| 256 | MANUALS = $(DOC)/$(DOC).html |
| 257 | FIGURES = figures |
| 258 | STYLESHEET = $(DOC)/*.css |
| 259 | |
| 260 | endif |
| 261 | |
| 262 | ifeq ($(DOC),ref-manual) |
| 263 | XSLTOPTS = --xinclude |
| 264 | ALLPREQ = html eclipse tarball |
| 265 | TARFILES = ref-manual.html ref-style.css figures/poky-title.png \ |
| 266 | figures/buildhistory.png figures/buildhistory-web.png eclipse \ |
| 267 | figures/cross-development-toolchains.png figures/layer-input.png \ |
| 268 | figures/package-feeds.png figures/source-input.png \ |
| 269 | figures/user-configuration.png figures/yocto-environment-ref.png \ |
| 270 | figures/images.png figures/sdk.png figures/source-fetching.png \ |
| 271 | figures/patching.png figures/configuration-compile-autoreconf.png \ |
| 272 | figures/analysis-for-package-splitting.png figures/image-generation.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 273 | figures/sdk-generation.png figures/building-an-image.png \ |
| 274 | figures/build-workspace-directory.png |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 275 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 276 | FIGURES = figures |
| 277 | STYLESHEET = $(DOC)/*.css |
| 278 | endif |
| 279 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 280 | ifeq ($(DOC),sdk-manual) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 281 | XSLTOPTS = --xinclude |
| 282 | ALLPREQ = html eclipse tarball |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 283 | TARFILES = sdk-manual.html sdk-style.css figures/sdk-title.png \ |
| 284 | figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \ |
| 285 | figures/sdk-installed-extensible-sdk-directory.png figures/sdk-devtool-add-flow.png \ |
| 286 | figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 287 | figures/sdk-devtool-upgrade-flow.png \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 288 | eclipse |
| 289 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 290 | FIGURES = figures |
| 291 | STYLESHEET = $(DOC)/*.css |
| 292 | endif |
| 293 | |
| 294 | ifeq ($(DOC),profile-manual) |
| 295 | XSLTOPTS = --xinclude |
| 296 | ALLPREQ = html eclipse tarball |
| 297 | TARFILES = profile-manual.html profile-manual-style.css \ |
| 298 | figures/profile-title.png figures/kernelshark-all.png \ |
| 299 | figures/kernelshark-choose-events.png \ |
| 300 | figures/kernelshark-i915-display.png \ |
| 301 | figures/kernelshark-output-display.png figures/lttngmain0.png \ |
| 302 | figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \ |
| 303 | figures/oprofileui-downloading.png figures/oprofileui-processes.png \ |
| 304 | figures/perf-probe-do_fork-profile.png \ |
| 305 | figures/perf-report-cycles-u.png \ |
| 306 | figures/perf-systemwide.png figures/perf-systemwide-libc.png \ |
| 307 | figures/perf-wget-busybox-annotate-menu.png \ |
| 308 | figures/perf-wget-busybox-annotate-udhcpc.png \ |
| 309 | figures/perf-wget-busybox-debuginfo.png \ |
| 310 | figures/perf-wget-busybox-dso-zoom.png \ |
| 311 | figures/perf-wget-busybox-dso-zoom-menu.png \ |
| 312 | figures/perf-wget-busybox-expanded-stripped.png \ |
| 313 | figures/perf-wget-flat-stripped.png \ |
| 314 | figures/perf-wget-g-copy-from-user-expanded-stripped.png \ |
| 315 | figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \ |
| 316 | figures/perf-wget-g-copy-to-user-expanded-stripped.png \ |
| 317 | figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \ |
| 318 | figures/pybootchartgui-linux-yocto.png \ |
| 319 | figures/pychart-linux-yocto-rpm.png \ |
| 320 | figures/pychart-linux-yocto-rpm-nostrip.png \ |
| 321 | figures/sched-wakeup-profile.png figures/sysprof-callers.png \ |
| 322 | figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \ |
| 323 | eclipse |
| 324 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 325 | FIGURES = figures |
| 326 | STYLESHEET = $(DOC)/*.css |
| 327 | endif |
| 328 | |
| 329 | ifeq ($(DOC),kernel-dev) |
| 330 | XSLTOPTS = --xinclude |
| 331 | ALLPREQ = html eclipse tarball |
| 332 | TARFILES = kernel-dev.html kernel-dev-style.css \ |
| 333 | figures/kernel-dev-title.png \ |
| 334 | figures/kernel-architecture-overview.png \ |
| 335 | eclipse |
| 336 | MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse |
| 337 | FIGURES = figures |
| 338 | STYLESHEET = $(DOC)/*.css |
| 339 | endif |
| 340 | |
| 341 | ifeq ($(DOC),toaster-manual) |
| 342 | XSLTOPTS = --xinclude |
| 343 | ALLPREQ = html tarball |
| 344 | TARFILES = toaster-manual.html toaster-manual-style.css \ |
| 345 | figures/toaster-title.png figures/simple-configuration.png \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 346 | figures/hosted-service.png \ |
| 347 | figures/compatible-layers.png figures/import-layer.png figures/new-project.png |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 348 | MANUALS = $(DOC)/$(DOC).html |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 349 | FIGURES = figures |
| 350 | STYLESHEET = $(DOC)/*.css |
| 351 | endif |
| 352 | |
| 353 | |
| 354 | ## |
| 355 | # These URI should be rewritten by your distribution's xml catalog to |
| 356 | # match your locally installed XSL stylesheets. |
| 357 | XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/1.76.1 |
| 358 | XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl |
| 359 | |
| 360 | all: $(ALLPREQ) |
| 361 | |
| 362 | pdf: |
| 363 | ifeq ($(DOC),yocto-project-qs) |
| 364 | @echo " " |
| 365 | @echo "ERROR: You cannot generate a yocto-project-qs PDF file." |
| 366 | @echo " " |
| 367 | |
| 368 | else ifeq ($(DOC),mega-manual) |
| 369 | @echo " " |
| 370 | @echo "ERROR: You cannot generate a mega-manual PDF file." |
| 371 | @echo " " |
| 372 | |
| 373 | else |
| 374 | |
| 375 | cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd .. |
| 376 | endif |
| 377 | |
| 378 | html: |
| 379 | ifeq ($(DOC),mega-manual) |
| 380 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html |
| 381 | @echo " " |
| 382 | @echo "******** Building "$(DOC) |
| 383 | @echo " " |
| 384 | cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. |
| 385 | @echo " " |
| 386 | @echo "******** Using mega-manual.sed to process external links" |
| 387 | @echo " " |
| 388 | cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd .. |
| 389 | @echo " " |
| 390 | @echo "******** Cleaning up transient file mega-output.html" |
| 391 | @echo " " |
| 392 | cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd .. |
| 393 | else |
| 394 | # See http://www.sagehill.net/docbookxsl/HtmlOutput.html |
| 395 | @echo " " |
| 396 | @echo "******** Building "$(DOC) |
| 397 | @echo " " |
| 398 | cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd .. |
| 399 | endif |
| 400 | |
| 401 | |
| 402 | eclipse: BASE_DIR = html/$(DOC)/ |
| 403 | |
| 404 | eclipse: eclipse-generate eclipse-resolve-links |
| 405 | |
| 406 | .PHONY : eclipse-generate eclipse-resolve-links |
| 407 | |
| 408 | eclipse-generate: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 409 | 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] | 410 | @echo " " |
| 411 | @echo "ERROR: You can only create eclipse documentation" |
| 412 | @echo " of the following documentation parts:" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 413 | @echo " - sdk-manual" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 414 | @echo " - bsp-guide" |
| 415 | @echo " - dev-manual" |
| 416 | @echo " - kernel-dev" |
| 417 | @echo " - profile-manual" |
| 418 | @echo " - ref-manual" |
| 419 | @echo " - yocto-project-qs" |
| 420 | @echo " " |
| 421 | else |
| 422 | @echo " " |
| 423 | @echo "******** Building eclipse help of "$(DOC) |
| 424 | @echo " " |
| 425 | cd $(DOC) && \ |
| 426 | xsltproc $(XSLTOPTS) \ |
| 427 | --stringparam base.dir '$(BASE_DIR)' \ |
| 428 | -o eclipse/$(DOC).html \ |
| 429 | $(DOC)-eclipse-customization.xsl $(DOC).xml && \ |
| 430 | mv eclipse/toc.xml eclipse/$(DOC)-toc.xml && \ |
| 431 | cp -rf $(FIGURES) eclipse/$(BASE_DIR) && \ |
| 432 | cd ..; |
| 433 | |
| 434 | $(call modify-eclipse) |
| 435 | endif |
| 436 | |
| 437 | eclipse-resolve-links: |
| 438 | @echo " " |
| 439 | @echo "******** Using eclipse-help.sed to process external links" |
| 440 | @echo " " |
| 441 | $(foreach FILE, \ |
| 442 | $(wildcard $(DOC)/eclipse/html/$(DOC)/*.html), \ |
| 443 | $(shell sed -i -f tools/eclipse-help.sed $(FILE))) |
| 444 | |
| 445 | tarball: html |
| 446 | @echo " " |
| 447 | @echo "******** Creating Tarball of document files" |
| 448 | @echo " " |
| 449 | cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd .. |
| 450 | |
| 451 | validate: |
| 452 | cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd .. |
| 453 | |
| 454 | |
| 455 | publish: |
| 456 | @if test -f $(DOC)/$(DOC).html; \ |
| 457 | then \ |
| 458 | echo " "; \ |
| 459 | echo "******** Publishing "$(DOC)".html"; \ |
| 460 | echo " "; \ |
| 461 | scp -r $(MANUALS) $(STYLESHEET) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \ |
| 462 | cd $(DOC); scp -r $(FIGURES) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \ |
| 463 | else \ |
| 464 | echo " "; \ |
| 465 | echo $(DOC)".html missing. Generate the file first then try again."; \ |
| 466 | echo " "; \ |
| 467 | fi |
| 468 | |
| 469 | clean: |
| 470 | rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz; |