VirtualBox

source: vbox/trunk/doc/manual/Makefile.kmk@ 34664

Last change on this file since 34664 was 34145, checked in by vboxsync, 14 years ago

build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 34.9 KB
Line 
1# $Id: Makefile.kmk 34145 2010-11-17 20:24:49Z vboxsync $
2## @file
3# Sub-Makefile for the VBox User Manual.
4#
5
6#
7# Copyright (C) 2006-2007 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18#
19# This slightly messy makefile transforms the DocBook XML source for the
20# user manual into presentation output. We support two targets:
21#
22# -- UserManual.pdf, generated by LaTex
23#
24# -- VirtualBox.chm
25#
26# Both files end up in PATH_BIN.
27#
28# Both targets indirectly depend on the XML files in this directory;
29# "indirectly" because we first copy them to PATH_TARGET and hack them
30# up a bit for variable substitution and such (see below).
31# The toolchains are roughly like this:
32#
33# -- PDF file via Apache FOP: pre-process the XML files in PATH_TARGET,
34# then create a .FO file (another XML format for "formatted objects")
35# via xsltproc, then feed the .FO file to Apache FOP to create the PDF.
36#
37# -- PDF file via LaTeX: pre-process the XML files in PATH_TARGET, then
38# run our custom "dblatex" perl script on UserManual.xml, which parses
39# the XML (using the Perl SAX parsers) and dumps a matching latex file
40# to UserManual.tex. This is then regularly processed by pdflatex to
41# generate PDF.
42#
43# -- CHM file: again, pre-process the XML files in PATH_TARGET, then use
44# xsltproc to create a .HHP file for the Microsoft Help Compiler, then
45# feed that file to it.
46#
47
48SUB_DEPTH = ../..
49include $(KBUILD_PATH)/subheader.kmk
50
51
52##########################################################################################
53#
54# Globals
55#
56##########################################################################################
57VBOX_PATH_MANUAL_SRC := $(PATH_SUB_CURRENT)
58VBOX_PATH_MANUAL_OUTBASE := $(PATH_TARGET)/manual
59BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE)
60
61
62##########################################################################################
63#
64# Main targets
65#
66##########################################################################################
67ifdef VBOX_WITH_DOCS
68 # Default language
69 VBOX_MANUAL_LANGUAGES = en_US
70
71 ifdef VBOX_WITH_DOCS_TRANSLATIONS
72 VBOX_MANUAL_ADD_LANGUAGES = fr_FR
73 endif
74
75 if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
76 ## @todo make this an install target, drop the BLDDIRS.
77 OTHERS += \
78 $(VBOX_PATH_SDK)/docs/SDKRef.pdf
79 BLDDIRS += \
80 $(VBOX_PATH_SDK)/docs
81 endif
82
83 ifdef VBOX_WITH_DOCS_CHM
84 VBOX_PATH_BIN_CHM = $(PATH_BIN)/VirtualBox.chm
85 else
86 VBOX_PATH_BIN_CHM =
87 # do not build
88 endif # !VBOX_WITH_DOCS_CHM
89
90 ifndef VBOX_ONLY_SDK
91 VBOX_MANUAL_PACK += \
92 $(PATH_BIN)/UserManual.pdf \
93 $(VBOX_PATH_BIN_CHM)
94 OTHERS += \
95 $(PATH_BIN)/UserManual.pdf
96 OTHERS.win += \
97 $(VBOX_PATH_BIN_CHM)
98 OTHERS.linux += \
99 $(VBOX_PATH_BIN_CHM)
100
101 ifdef VBOX_WITH_DOCS_TRANSLATIONS
102 OTHERS += \
103 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf)
104 ifdef VBOX_WITH_DOCS_CHM
105 OTHERS.win += \
106 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm)
107 OTHERS.linux += \
108 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm)
109 endif
110 endif
111 endif # !VBOX_ONLY_SDK
112 ifdef VBOX_ONLY_DOCS
113 PACKING += $(PATH_BIN)/VBoxDocumentation.zip
114 endif
115
116 ifdef VBOX_WITH_DOCS_TRANSLATIONS
117 VBOX_MANUAL_LANGUAGES += $(VBOX_MANUAL_ADD_LANGUAGES)
118 endif
119
120 VBOX_MANUAL_XML_CHANGELOG = \
121 user_ChangeLogImpl.xml
122
123 VBOX_MANUAL_XML_FILES = \
124 UserManual.xml \
125 user_AdvancedTopics.xml \
126 user_BasicConcepts.xml \
127 user_ChangeLog.xml \
128 user_Glossary.xml \
129 user_Frontends.xml \
130 user_Installation.xml \
131 user_GuestAdditions.xml \
132 user_Introduction.xml \
133 user_KnownIssues.xml \
134 user_PrivacyPolicy.xml \
135 user_Technical.xml \
136 user_ThirdParty.xml \
137 user_Troubleshooting.xml \
138 user_VBoxManage.xml \
139 user_VirtualBoxAPI.xml \
140 user_Storage.xml \
141 user_Networking.xml
142
143 VBOX_SDKREF_XML_FILES = \
144 SDKRef.xml
145
146 # Wildcard the images path for every supported language
147 $(foreach f,$(VBOX_MANUAL_LANGUAGES), \
148 $(eval VBOX_MANUAL_PNG_FILES_$$(f) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(f)/%,%,$$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(f)/images/*.png))))
149
150 VBOX_MANUAL_TEX_UNICODE_FILES = \
151 $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
152
153 VBOX_MANUAL_LATEX_FILES_TARGET = \
154 $(addprefix UserManual.,aux log out toc tex)
155
156 VBOX_SDKREF_LATEX_FILES_TARGET = \
157 $(addprefix SDKRef.,aux log out toc tex)
158
159 BLDDIRS += \
160 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,\
161 $(VBOX_MANUAL_LANGUAGES) \
162 $(addsuffix /images, $(VBOX_MANUAL_LANGUAGES)) \
163 $(addsuffix /html-single, $(VBOX_MANUAL_LANGUAGES)) \
164 $(addsuffix /html-chunks, $(VBOX_MANUAL_LANGUAGES)) \
165 $(addsuffix /HTMLHelp, $(VBOX_MANUAL_LANGUAGES)) \
166 $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_LANGUAGES)) \
167 )
168
169 ifdef VBOX_WITH_DOCS_CHM
170 VBOX_MANUAL_PACK += \
171 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf $(PATH_BIN)/VirtualBox_$(f).chm)
172 endif
173
174 OTHER_CLEAN += \
175 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_XML_FILES))) \
176 $(foreach f,en_US, $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_SDKREF_XML_FILES))) \
177 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_LATEX_FILES_TARGET))) \
178 $(foreach f,en_US, $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_SDKREF_LATEX_FILES_TARGET))) \
179 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, \
180 catalog docbook \
181 UserManual.fo) \
182 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/, \
183 docbook-htmlhelp-formatcfg.xsl \
184 docbook-html-one-page-formatcfg.xsl \
185 docbook-html-chunks-formatcfg.xsl \
186 titlepage-htmlhelp.xsl )) \
187 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) \
188 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f)))) \
189 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf) \
190 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm) \
191 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf) \
192 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm) \
193 $(PATH_BIN)/UserManual.pdf \
194 $(PATH_BIN)/VirtualBox.chm \
195 $(foreach f,en_US,$(VBOX_PATH_MANUAL_OUTBASE)/$f/SDKRef.pdf) \
196 $(PATH_BIN)/sdk/docs/SDKRef.pdf \
197 $(wildcard $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/*.h*)) \
198 $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
199 $(patsubst $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/%,$(VBOX_PATH_MANUAL_OUTBASE)/$f/%, \
200 $(VBOX_MANUAL_TEX_UNICODE_FILES))) \
201 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
202
203endif # VBOX_WITH_DOCS
204
205
206
207##########################################################################################
208#
209# Options
210#
211##########################################################################################
212
213HTMLHELPOPTS =
214
215
216##########################################################################################
217#
218# Preparations
219#
220##########################################################################################
221
222# tool locations
223ifndef VBOX_OSE
224 # use docbook from our tools directory
225 DOCBOOKPATH ?= $(PATH_DEVTOOLS)/common/DocBook/v1.69.1
226 DOCBOOKDTDPATH ?= $(PATH_DEVTOOLS)/common/docbook-xml/v4.3
227 XML_CATALOG ?= $(VBOX_PATH_MANUAL_OUTBASE)/catalog
228 XML_CATALOG_DOCBOOK ?= $(VBOX_PATH_MANUAL_OUTBASE)/docbook
229else
230 # use docbook of the build host
231 DOCBOOKPATH ?= http://docbook.sourceforge.net/release/xsl/current/
232endif
233VBOXMANAGEPATH ?= $(PATH_BIN)/VBoxManage$(SUFF_EXE)
234
235 # PDFLATEX_INTERACTION = errorstopmode - Use this when you wants to figure out build failures
236 # without catting the log a million times.
237 PDFLATEX_INTERACTION ?= batchmode
238ifeq ($(KBUILD_HOST),win)
239 # tell MiKTeX to automatically download packages
240 PDFLATEX = pdflatex -halt-on-error -interaction $(PDFLATEX_INTERACTION) --enable-installer
241else
242 PDFLATEX_HALT = $(shell \
243 ( pdflatex -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
244 PDFLATEX = pdflatex $(PDFLATEX_HALT) -interaction $(PDFLATEX_INTERACTION)
245endif
246
247# Windows HTML Help Workshop compiler (stupid thing always returns an error!)
248HHC = -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe
249
250
251##########################################################################################
252#
253# Rules: Preprocess DocBook XML files
254# (preliminary step for both CHM and PDF generation)
255#
256##########################################################################################
257
258#
259# The following rules for $(VBOX_PATH_MANUAL_OUTBASE)/*.xml process the XML files
260# in doc/manual to allow for some magic variable replacements. The PDF and CHM
261# targets do not depend on the XML files in doc/manual, but those in
262# $(VBOX_PATH_MANUAL_OUTBASE) instead, which we copy there from here, after that magic
263# processing.
264#
265# So, before copying, the following steps are performed:
266#
267# -- $VBOX_VERSION_* strings are replaced with the actual current VBox version.
268# -- $VBOX_MANAGE_OUTPUT (in VBoxManage.xml) is replaced with the current
269# output of the actual VBoxManage program, to save us from having to
270# update the manual all the time.
271#
272
273# Only one changelog for all languages
274$(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG): $(VBOX_PATH_MANUAL_SRC)/$(VBOX_MANUAL_XML_CHANGELOG) | $$(dir $$@)
275 $(QUIET)$(INSTALL) -m 0644 $< $@
276
277# intermediate step to do some variable replacement in the document
278$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES)))): \
279 $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_VERSION_STAMP) | $$(dir $$@)
280 $(call MSG_L1,Pre-processing [1] $(@F) to $@)
281 $(QUIET)$(RM) -f $@ [email protected]
282 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
283 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
284 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
285 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
286 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
287 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
288 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
289 --output [email protected] $<
290 $(QUIET)$(MV) -f [email protected] $@
291
292$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_VBoxManage.xml): \
293 $(VBOX_PATH_MANUAL_OUTBASE)/% : \
294 $(VBOX_PATH_MANUAL_SRC)/% \
295 $(VBOXMANAGEPATH) | $$(dir $$@)
296 $(call MSG_L1,Pre-processing [2] $(@F) to $@)
297 $(QUIET)$(RM) -f $@ [email protected] [email protected]
298 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
299 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
300 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
301 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
302 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
303 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
304 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
305 --output [email protected] $<
306 $(QUIET)$(SED) -e '1,/\$$VBOX_MANAGE_OUTPUT/!d' \
307 -e 's/\$$VBOX_MANAGE_OUTPUT.*//' \
308 --output $@ [email protected]
309 $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
310 $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
311 -- \
312 $(VBOXMANAGEPATH) --dumpopts
313 $(QUIET)$(SED) -e 's/</\&lt;/g' -e 's/>/\&gt;/g' --append $@ [email protected]
314 $(QUIET)$(SED) -e '/\$$VBOX_MANAGE_OUTPUT/,$$!d' \
315 -e 's/.*\$$VBOX_MANAGE_OUTPUT//' --append $@ [email protected]
316 $(QUIET)$(RM) -f [email protected] [email protected]
317
318VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
319VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
320VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
321
322$(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
323 $(call MSG_L1,Generating $@)
324 $(QUIET)$(SED) -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
325 -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
326 --output $@ $<
327
328# generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
329$(VBOX_MANUAL_APIREF_TMP): $(VBOX_DOC_XIDL_SRC_TMP) $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl
330 $(call MSG_L1,Generating $@)
331 $(QUIET)$(VBOX_XSLTPROC) --xinclude -o $@ $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
332
333$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.xml: \
334 $(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef.xml $(VBOX_MANUAL_APIREF_TMP) \
335 | $$(dir $$@)
336 $(call MSG_L1,Pre-processing [2] $(@F) to $@)
337 $(QUIET)$(RM) -f $@ [email protected]
338 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
339 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
340 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
341 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
342 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
343 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
344 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
345 --output [email protected] $<
346 $(QUIET)$(SED) -e '1,/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/!d' \
347 -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' \
348 --output $@ [email protected]
349 $(QUIET)$(SED) -e 's/<?xml version=\"1.0\" encoding=\"utf-8\"?>//g' --append $@ $(VBOX_MANUAL_APIREF_TMP)
350 $(QUIET)$(SED) -e '/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/,$$!d' \
351 -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' --append $@ [email protected]
352# $(QUIET)$(MV) -f [email protected] $@
353
354
355##########################################################################################
356#
357# Rules: Create or preprocess files for xsltproc
358# (preliminary step for both CHM and PDF generation)
359#
360##########################################################################################
361
362# Create a catalog file for xsltproc that points to docbook catalog.
363ifneq ($(XML_CATALOG),)
364$(XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@)
365 $(call MSG_L1,Creating catalog $@)
366 $(QUIET)$(RM) -f [email protected] $@
367 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
368 $(QUIET)$(APPEND) [email protected] '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
369 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
370 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
371 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
372 $(QUIET)$(APPEND) [email protected] ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
373 $(QUIET)$(APPEND) [email protected] ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
374 $(QUIET)$(APPEND) [email protected] '</catalog>'
375 $(QUIET)$(MV) -f [email protected] $@
376
377# Create a docbook catalog file for xsltproc that points to the local docbook files.
378$(XML_CATALOG_DOCBOOK): $(MAKEFILE_CURRENT) | $$(dir $$@)
379 $(call MSG_L1,Creating catalog $@)
380 $(QUIET)$(RM) -f [email protected] $@
381 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
382 $(QUIET)$(APPEND) [email protected] '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
383 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
384 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbpoolx.mod"/>'
385 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/docbookx.dtd"/>'
386 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.4//EN" uri="file:///$(DOCBOOKDTDPATH)/docbookx.dtd"/>'
387 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbcentx.mod"/>'
388 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbnotnx.mod"/>'
389 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbgenent.mod"/>'
390 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbhierx.mod"/>'
391 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="file:///$(DOCBOOKDTDPATH)/soextblx.dtd"/>'
392 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/calstblx.dtd"/>'
393 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
394 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
395 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
396 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
397 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsa.ent"/>'
398 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsb.ent"/>'
399 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsc.ent"/>'
400 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsn.ent"/>'
401 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amso.ent"/>'
402 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsr.ent"/>'
403 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-box.ent"/>'
404 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-cyr1.ent"/>'
405 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-cyr2.ent"/>'
406 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-dia.ent"/>'
407 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk1.ent"/>'
408 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk2.ent"/>'
409 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk3.ent"/>'
410 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk4.ent"/>'
411 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-lat1.ent"/>'
412 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-lat2.ent"/>'
413 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-num.ent"/>'
414 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-pub.ent"/>'
415 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-tech.ent"/>'
416 $(QUIET)$(APPEND) [email protected] '</catalog>'
417 $(QUIET)$(MV) -f [email protected] $@
418endif
419
420# intermediate step to do some variable replacement in the XSL configuration
421$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/docbook-htmlhelp-formatcfg.xsl): \
422 $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
423 $(call MSG_L1,Pre-processing $(@F) to $@)
424 $(QUIET)$(RM) -f [email protected] $@
425 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
426 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
427 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
428 $(QUIET)$(MV) -f [email protected] $@
429
430# Prepare the XSL file for our title page, htmlhelp variant.
431$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/titlepage-htmlhelp.xsl): \
432 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
433 $(call MSG_L1,xsltproc $<)
434 $(QUIET)$(RM) -f [email protected] $@
435 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(DOCBOOKPATH)/template/titlepage.xsl $<
436 $(QUIET)$(MV) -f [email protected] $@
437
438
439##########################################################################################
440#
441# Shared rules for PDF generation
442#
443##########################################################################################
444
445ifndef VBOX_OSE
446# copy ucs.sty and related files
447$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/ucs.sty):
448 $(call MSG_L1,Copying unicode support for LaTeX)
449 $(QUIET)$(CP) $(VBOX_MANUAL_TEX_UNICODE_FILES) $(@D)
450endif
451
452# copy the PNG files.
453# Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
454define def_vbox_cp_images_pdf
455local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
456$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
457 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
458 $$(call MSG_L1,Copying temporary $$< => $$@)
459 $$(QUIET)$$(CP) -f $$< $$@
460endef
461
462$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_pdf)))
463
464
465##########################################################################################
466#
467# UserManual.pdf
468#
469##########################################################################################
470
471## @todo INSTALLS target for this!
472$(PATH_BIN)/UserManual.pdf: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf | $$(dir $$@)
473 $(QUIET)$(CP) $< $@
474 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
475
476$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf): \
477 $(PATH_BIN)/UserManual_%.pdf : $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf
478 $(QUIET)$(CP) $< $@
479 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
480
481$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf): \
482 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf : \
483 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex \
484 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/%/ucs.sty) \
485 $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
486 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) | $$(dir $$@)
487# PDF generation via Latex: generate the .tex file
488 $(call MSG_L1,pdflatex $< (three passes) -> $@)
489 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(PDFLATEX) UserManual.tex
490 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(PDFLATEX) UserManual.tex
491 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(PDFLATEX) UserManual.tex
492 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(PDFLATEX) UserManual.tex
493##@todo restore this when above has been converted to INSTALLS target. $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
494
495# generate temporary LaTeX source from processed XML
496$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.tex): \
497 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex : \
498 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES)) \
499 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
500 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
501 $(MAKEFILE_CURRENT)
502 $(call MSG_L1,Generating $@ from DocBook XML)
503 $(QUIET)$(RM) -f $(addprefix $(@D)/,$(VBOX_MANUAL_LATEX_FILES_TARGET))
504# generate TeX source from processed docbook and store it in UserManual.tex.tmp;
505# pass current language to xsltproc in TARGETLANG variable (extract it from the
506# current directory, should become "de_DE" or the like)
507 $(QUIET)$(VBOX_XSLTPROC) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG $(notdir $(@D)) -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
508# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
509# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
510 $(QUIET)$(SED) \
511 -e 's|^\\QUOTE{}|\\OQ{}|g' \
512 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
513 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
514 --output $@ [email protected]
515 $(QUIET)$(RM) -f [email protected]
516
517
518##########################################################################################
519#
520# SDKRef.pdf
521#
522##########################################################################################
523
524$(VBOX_PATH_SDK)/docs/SDKRef.pdf: \
525 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
526 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
527 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
528# PDF generation via Latex: generate the .tex file
529 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/docs
530 $(call MSG_L1,pdflatex $< (three passes))
531 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
532 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
533 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
534 $(QUIET)$(CP) $(<D)/SDKRef.pdf $@
535 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
536
537# generate temporary LaTeX source from processed XML
538$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_SDKREF_XML_FILES)) $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $(MAKEFILE_CURRENT)
539 $(call MSG_L1,Generating $@ from DocBook XML)
540 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
541# generate TeX source from processed docbook and store it in SDKRef.tex.tmp
542 $(QUIET)$(VBOX_XSLTPROC) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG en_US -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
543# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
544# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
545 $(QUIET)$(SED) \
546 -e 's|^\\QUOTE{}|\\OQ{}|g' \
547 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
548 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
549 --output $@ [email protected]
550 $(QUIET)$(RM) -f [email protected]
551
552
553##########################################################################################
554#
555# VirtualBox.chm
556#
557##########################################################################################
558
559#
560# Main rule for the .chm file (target of OTHERS at the top):
561# We first generate a .hhp help source file from the preprocessed
562# DocBook XML files, as defined above, then feed that into the
563# Microsoft Help Compiler.
564#
565
566ifdef VBOX_WITH_DOCS_CHM
567$(PATH_BIN)/VirtualBox.chm: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
568 $(QUIET)$(CP) $< $@
569 $(call MSG_L1,Fresh CHM is now at $@)
570
571$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm): \
572 $(PATH_BIN)/VirtualBox_%.chm : $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm
573 $(QUIET)$(CP) $< $@
574 $(call MSG_L1,Fresh CHM is now at $@)
575
576$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm): \
577 $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm: \
578 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp \
579 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f))))
580 $(call MSG_L1,hhc $<,=> $@)
581 $(QUIET)$(RM) -f $@
582 $(QUIET)$(HHC) $(subst /,\\,$<)
583
584$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/htmlhelp.hhp): \
585 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp: \
586 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES)) \
587 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
588 $(VBOX_PATH_MANUAL_OUTBASE)/%/docbook-htmlhelp-formatcfg.xsl \
589 $(VBOX_PATH_MANUAL_OUTBASE)/%/titlepage-htmlhelp.xsl \
590 $(XML_CATALOG) \
591 $(XML_CATALOG_DOCBOOK)
592 $(call MSG_L1,xsltproc $<,=> $@)
593 $(QUIET)$(RM) -f $@
594 $(QUIET)$(MKDIR) -p $(@D)
595 $(QUIET)$(if $(XML_CATALOG),XML_CATALOG_FILES=$(XML_CATALOG)) \
596 $(VBOX_XSLTPROC) --xinclude --nonet --output $(@D)/ \
597 --stringparam htmlhelp.chm \
598 $(subst /,\\,$(@D)/../VirtualBox.chm) \
599 $(HTMLHELPOPTS) $(@D)/../docbook-htmlhelp-formatcfg.xsl \
600 $<
601
602# copy the PNG files.
603# Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
604define def_vbox_cp_images_html
605local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/HTMLHelp
606$$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
607 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
608 $$(call MSG_L1,Copying temporary $$< => $$@)
609 $$(QUIET)$$(CP) -f $$< $$@
610endef
611
612$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_html)))
613
614# Packing the docs into a zip file
615$(PATH_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
616 $(call MSG_L1,Packing documentation $@)
617 $(QUIET)$(RM) -f $@
618 $(QUIET)$(REDIRECT) -C $(PATH_BIN) -- zip$(HOSTSUFF_EXE) -9 $@ $(notdir $^)
619endif # VBOX_WITH_DOCS_CHM
620
621##########################################################################################
622#
623# UserManual.html
624#
625##########################################################################################
626
627# intermediate step to do some variable replacement in the XSL configuration
628$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl: \
629 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
630 $(call MSG_L1,Pre-processing $(@F) to $@)
631 $(QUIET)$(RM) -f [email protected] $@
632 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
633 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
634 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
635 $(QUIET)$(MV) -f [email protected] $@
636
637$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl: \
638 $(VBOX_PATH_MANUAL_SRC)/docbook-html-chunks-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
639 $(call MSG_L1,Pre-processing $(@F) to $@)
640 $(QUIET)$(RM) -f [email protected] $@
641 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
642 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
643 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
644 $(QUIET)$(MV) -f [email protected] $@
645
646$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
647 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
648 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
649 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
650 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
651 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
652 $(call MSG_L1,xsltproc $<)
653 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet \
654 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
655 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
656 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
657
658$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
659 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
660 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
661 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
662 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
663 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
664 $(call MSG_L1,xsltproc $<)
665 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet \
666 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
667 --stringparam chunk.section.depth 0 \
668 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
669 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
670
671$(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
672 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
673 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
674 $(call MSG_L1,Packing documentation $@)
675 $(QUIET)$(RM) -f $@
676 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- zip$(HOSTSUFF_EXE) \
677 -9 -r $@ html-single html-chunks $(VBOX_MANUAL_PNG_FILES_en_US)
678
679html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
680
681html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
682
683html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
684
685##########################################################################################
686#
687# ChangeLog.html
688#
689##########################################################################################
690
691# intermediate step to do some variable replacement in the XSL configuration
692$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl: \
693 $(VBOX_PATH_MANUAL_SRC)/docbook-changelog-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
694 $(call MSG_L1,Pre-processing $(@F) to $@)
695 $(QUIET)$(RM) -f [email protected] $@
696 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
697 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
698 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
699 $(QUIET)$(MV) -f [email protected] $@
700
701$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml: ChangeLog.xml
702 $(QUIET)$(CP) $< $@
703
704$(VBOX_PATH_MANUAL_OUTBASE)/user_ChangeLogImpl_1.xml: $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml
705 $(QUIET)$(RM) -f [email protected] $@
706 $(QUIET)$(SED) -e 's|para|simpara|g' \
707 --output [email protected] $<
708 $(QUIET)$(MV) -f [email protected] $@
709
710$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
711 $(VBOX_PATH_MANUAL_OUTBASE)/user_ChangeLogImpl_1.xml \
712 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl \
713 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml
714 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html \
715 $(@D)/docbook-changelog-formatcfg.xsl \
716 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml
717
718$(PATH_BIN)/ChangeLog.html: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
719 $(QUIET)$(CP) $< $@
720 $(call MSG_L1,Fresh ChangeLog.html is now at $@)
721
722cl-html: $(PATH_BIN)/ChangeLog.html
723
724include $(KBUILD_PATH)/subfooter.kmk
725
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette