1 | # $Id: Makefile.kmk 56194 2015-06-01 17:49:03Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VBox User Manual.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2012 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_STAGE_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 |
|
---|
48 | SUB_DEPTH = ../..
|
---|
49 | include $(KBUILD_PATH)/subheader.kmk
|
---|
50 |
|
---|
51 |
|
---|
52 | #
|
---|
53 | # Globals
|
---|
54 | #
|
---|
55 |
|
---|
56 | # Error out if someone tries to override old globals.
|
---|
57 | ifdef HTMLHELPOPTS
|
---|
58 | $(error HTMLHELPOPTS was renamed to VBOX_HTMLHELP_OPTS!)
|
---|
59 | endif
|
---|
60 | ifdef DOCBOOKPATH
|
---|
61 | $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
|
---|
62 | endif
|
---|
63 | ifdef DOCBOOKPATH
|
---|
64 | $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
|
---|
65 | endif
|
---|
66 | ifdef XML_CATALOG
|
---|
67 | $(error XML_CATALOG was renamed to VBOX_XML_CATALOG!)
|
---|
68 | endif
|
---|
69 | ifdef VBOX_XML_CATALOG_DOCBOOK
|
---|
70 | $(error XML_CATALOG_DOCBOOK was renamed to VBOX_XML_CATALOG_DOCBOOK!)
|
---|
71 | endif
|
---|
72 | ifdef VBOXMANAGEPATH
|
---|
73 | $(error VBOXMANAGEPATH was renamed to VBOXMANAGEHELP_PATH!)
|
---|
74 | endif
|
---|
75 | ifdef PDFLATEX_INTERACTION
|
---|
76 | $(error PDFLATEX_INTERACTION was renamed to VBOX_PDFLATEX_INTERACTION!)
|
---|
77 | endif
|
---|
78 | ifdef PDFLATEX
|
---|
79 | $(error PDFLATEX was renamed to VBOX_PDFLATEX_CMD!)
|
---|
80 | endif
|
---|
81 | ifdef HHC
|
---|
82 | $(error HHC was renamed to VBOX_HHC!)
|
---|
83 | endif
|
---|
84 |
|
---|
85 | # Source and output locations.
|
---|
86 | VBOX_PATH_MANUAL_SRC := $(PATH_SUB_CURRENT)
|
---|
87 | VBOX_PATH_MANUAL_OUTBASE := $(PATH_TARGET)/manual
|
---|
88 |
|
---|
89 | # tool locations
|
---|
90 | ifndef VBOX_OSE
|
---|
91 | # use docbook from our tools directory
|
---|
92 | VBOX_PATH_DOCBOOK ?= $(PATH_DEVTOOLS)/common/DocBook/v1.69.1
|
---|
93 | VBOX_PATH_DOCBOOK_DTD ?= $(PATH_DEVTOOLS)/common/docbook-xml/v4.3
|
---|
94 | VBOX_XML_CATALOG ?= $(VBOX_PATH_MANUAL_OUTBASE)/catalog
|
---|
95 | VBOX_XML_CATALOG_DOCBOOK ?= $(VBOX_PATH_MANUAL_OUTBASE)/docbook
|
---|
96 | else
|
---|
97 | # use docbook of the build host
|
---|
98 | VBOX_PATH_DOCBOOK ?= http://docbook.sourceforge.net/release/xsl/current/
|
---|
99 | endif
|
---|
100 |
|
---|
101 | # xsltproc with the catalog trick if applicable.
|
---|
102 | ifdef VBOX_XML_CATALOG
|
---|
103 | VBOX_XSLTPROC_WITH_CAT = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" -- $(VBOX_XSLTPROC)
|
---|
104 | else
|
---|
105 | VBOX_XSLTPROC_WITH_CAT = $(VBOX_XSLTPROC)
|
---|
106 | endif
|
---|
107 |
|
---|
108 | VBOXMANAGEHELP_PATH ?= $(PATH_STAGE_BIN)/VBoxManageHelp$(SUFF_EXE)
|
---|
109 |
|
---|
110 | # VBOX_PDFLATEX_INTERACTION = errorstopmode - Use this when you wants to figure out build failures
|
---|
111 | # without catting the log a million times.
|
---|
112 | VBOX_PDFLATEX_INTERACTION ?= batchmode
|
---|
113 | ifeq ($(KBUILD_HOST),win)
|
---|
114 | ifndef VBOX_PDFLATEX
|
---|
115 | VBOX_PDFLATEX := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/miktex-portable/*/miktex/bin/pdflatex.exe)))
|
---|
116 | ifneq ($(VBOX_PDFLATEX),)
|
---|
117 | VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION)
|
---|
118 | endif
|
---|
119 | endif
|
---|
120 | ifndef VBOX_PDFLATEX
|
---|
121 | # Tell MiKTeX to automatically download packages if system wide install.
|
---|
122 | VBOX_PDFLATEX := pdflatex
|
---|
123 | VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION) --enable-installer
|
---|
124 | endif
|
---|
125 | else
|
---|
126 | VBOX_PDFLATEX ?= pdflatex
|
---|
127 | VBOX_PDFLATEX_HALT = $(shell ( $(VBOX_PDFLATEX) -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
|
---|
128 | VBOX_PDFLATEX_CMD = pdflatex $(VBOX_PDFLATEX_HALT) -interaction $(VBOX_PDFLATEX_INTERACTION)
|
---|
129 | endif
|
---|
130 |
|
---|
131 | # Windows HTML Help Workshop compiler (stupid thing always returns an error!)
|
---|
132 | VBOX_HHC = -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe
|
---|
133 |
|
---|
134 |
|
---|
135 | # Additional xsltproc options when generating
|
---|
136 | VBOX_HTMLHELP_OPTS ?=
|
---|
137 |
|
---|
138 | # SDK related globals.
|
---|
139 | VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
|
---|
140 | VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
|
---|
141 | VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
|
---|
142 |
|
---|
143 | ##
|
---|
144 | # Non-pattern-rule approach to editing XSLT files.
|
---|
145 | # $(evalcall2 def_vbox_replace_paths_in_xslt)
|
---|
146 | # @param 1 The XSLT source file.
|
---|
147 | # @param 2 Optional output subdirectory.
|
---|
148 | define def_vbox_replace_paths_in_xslt
|
---|
149 | OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)/$2$(notdir $1)
|
---|
150 | $$(VBOX_PATH_MANUAL_OUTBASE)/$2$(notdir $1): $1 | $$$$(dir $$$$@)
|
---|
151 | $$(call MSG_GENERATE,,$$@,$$<)
|
---|
152 | $$(QUIET)$$(SED) \
|
---|
153 | -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
|
---|
154 | -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
155 | -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
|
---|
156 | \
|
---|
157 | -e 's|@CFGPATH@|$$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
158 | -e 's|@TARGETPATH@|$$(@D)|g' \
|
---|
159 | --output "$$(@)" $$<
|
---|
160 | endef
|
---|
161 |
|
---|
162 |
|
---|
163 |
|
---|
164 | #
|
---|
165 | # Targets
|
---|
166 | #
|
---|
167 |
|
---|
168 | BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE)
|
---|
169 |
|
---|
170 | ifdef VBOX_WITH_DOCS
|
---|
171 | if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
|
---|
172 | ## @todo make this an install target, drop the BLDDIRS.
|
---|
173 | OTHERS += \
|
---|
174 | $(VBOX_PATH_SDK)/docs/SDKRef.pdf
|
---|
175 | BLDDIRS += \
|
---|
176 | $(VBOX_PATH_SDK)/docs
|
---|
177 | endif
|
---|
178 |
|
---|
179 | ifdef VBOX_WITH_DOCS_CHM
|
---|
180 | VBOX_PATH_BIN_CHM = $(PATH_STAGE_BIN)/VirtualBox.chm
|
---|
181 | else # Do not build chm.
|
---|
182 | VBOX_PATH_BIN_CHM =
|
---|
183 | endif
|
---|
184 |
|
---|
185 | ifndef VBOX_ONLY_SDK
|
---|
186 | VBOX_MANUAL_PACK += \
|
---|
187 | $(PATH_STAGE_BIN)/UserManual.pdf \
|
---|
188 | $(VBOX_PATH_BIN_CHM)
|
---|
189 | OTHERS += \
|
---|
190 | $(PATH_STAGE_BIN)/UserManual.pdf
|
---|
191 | OTHERS.win += \
|
---|
192 | $(VBOX_PATH_BIN_CHM)
|
---|
193 | OTHERS.linux += \
|
---|
194 | $(VBOX_PATH_BIN_CHM)
|
---|
195 |
|
---|
196 | ifdef VBOX_WITH_DOCS_TRANSLATIONS
|
---|
197 | OTHERS += \
|
---|
198 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf)
|
---|
199 | ifdef VBOX_WITH_DOCS_CHM
|
---|
200 | OTHERS.win += \
|
---|
201 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm)
|
---|
202 | OTHERS.linux += \
|
---|
203 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm)
|
---|
204 | endif
|
---|
205 | endif
|
---|
206 | endif # !VBOX_ONLY_SDK
|
---|
207 | ifdef VBOX_ONLY_DOCS
|
---|
208 | PACKING += $(PATH_STAGE_BIN)/VBoxDocumentation.zip
|
---|
209 | endif
|
---|
210 |
|
---|
211 | ifdef VBOX_WITH_DOCS_TRANSLATIONS
|
---|
212 | VBOX_MANUAL_LANGUAGES += $(VBOX_MANUAL_ADD_LANGUAGES)
|
---|
213 | endif
|
---|
214 |
|
---|
215 | VBOX_MANUAL_XML_CHANGELOG = \
|
---|
216 | user_ChangeLogImpl.xml
|
---|
217 |
|
---|
218 | VBOX_MANUAL_XML_FILES = \
|
---|
219 | UserManual.xml \
|
---|
220 | user_AdvancedTopics.xml \
|
---|
221 | user_BasicConcepts.xml \
|
---|
222 | user_Glossary.xml \
|
---|
223 | user_Frontends.xml \
|
---|
224 | user_Installation.xml \
|
---|
225 | user_GuestAdditions.xml \
|
---|
226 | user_Introduction.xml \
|
---|
227 | user_KnownIssues.xml \
|
---|
228 | user_PrivacyPolicy.xml \
|
---|
229 | user_Security.xml \
|
---|
230 | user_Technical.xml \
|
---|
231 | user_ThirdParty.xml \
|
---|
232 | user_Troubleshooting.xml \
|
---|
233 | user_VBoxManage.xml \
|
---|
234 | user_VirtualBoxAPI.xml \
|
---|
235 | user_Storage.xml \
|
---|
236 | user_Networking.xml
|
---|
237 |
|
---|
238 | VBOX_MANUAL_XML_FILES_INCL_CHANGELOG = $(VBOX_MANUAL_XML_FILES) \
|
---|
239 | user_ChangeLog.xml
|
---|
240 |
|
---|
241 | VBOX_MANUAL_XML_REFENTRY_FILES = \
|
---|
242 | man_VBoxManage_extpack.xml
|
---|
243 |
|
---|
244 | VBOX_SDKREF_XML_FILES = \
|
---|
245 | SDKRef.xml
|
---|
246 |
|
---|
247 | # Wildcard the images path for every supported language
|
---|
248 | $(foreach f,$(VBOX_MANUAL_LANGUAGES), \
|
---|
249 | $(eval VBOX_MANUAL_PNG_FILES_$$(f) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(f)/%,%,$$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(f)/images/*.png))))
|
---|
250 |
|
---|
251 | VBOX_MANUAL_TEX_UNICODE_FILES = \
|
---|
252 | $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
|
---|
253 |
|
---|
254 | VBOX_MANUAL_LATEX_FILES_TARGET = \
|
---|
255 | $(addprefix UserManual.,aux log out toc tex)
|
---|
256 |
|
---|
257 | VBOX_SDKREF_LATEX_FILES_TARGET = \
|
---|
258 | $(addprefix SDKRef.,aux log out toc tex)
|
---|
259 |
|
---|
260 | BLDDIRS += \
|
---|
261 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,\
|
---|
262 | $(VBOX_MANUAL_LANGUAGES) \
|
---|
263 | $(addsuffix /images, $(VBOX_MANUAL_LANGUAGES)) \
|
---|
264 | $(addsuffix /html-single, $(VBOX_MANUAL_LANGUAGES)) \
|
---|
265 | $(addsuffix /html-chunks, $(VBOX_MANUAL_LANGUAGES)) \
|
---|
266 | $(addsuffix /HTMLHelp, $(VBOX_MANUAL_LANGUAGES)) \
|
---|
267 | $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_LANGUAGES)) \
|
---|
268 | )
|
---|
269 |
|
---|
270 | ifdef VBOX_WITH_DOCS_CHM
|
---|
271 | VBOX_MANUAL_PACK += \
|
---|
272 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf $(PATH_STAGE_BIN)/VirtualBox_$(f).chm)
|
---|
273 | endif
|
---|
274 |
|
---|
275 | OTHER_CLEAN += \
|
---|
276 | $(VBOX_XML_CATALOG) \
|
---|
277 | $(VBOX_XML_CATALOG_DOCBOOK) \
|
---|
278 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
|
---|
279 | $(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG) \
|
---|
280 | $(VBOX_MANUAL_XML_REFENTRY_FILES) \
|
---|
281 | $(VBOX_MANUAL_LATEX_FILES_TARGET) \
|
---|
282 | $(VBOX_MANUAL_PNG_FILES_$(lang)) \
|
---|
283 | $(notdir $(VBOX_MANUAL_TEX_UNICODE_FILES)) \
|
---|
284 | $(addprefix HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(lang))) \
|
---|
285 | html-single/UserManual.html \
|
---|
286 | $(addprefix html-chunks/ HTMLHelp/, index.html go01.html) \
|
---|
287 | $(foreach n,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 \
|
---|
288 | ,html-chunks/ch$(n).html \
|
---|
289 | HTMLHelp/ch$(n).html \
|
---|
290 | $(foreach d2,0 1 2 3 4 5 6 7 8 9,$(foreach d1,0 1 2 3 4 5 6 7 8 9,HTMLHelp/ch$(n)s$(d2)$(d1).html)) ) \
|
---|
291 | $(foreach n,a b c \
|
---|
292 | ,html-chunks/ap$(n).html \
|
---|
293 | HTMLHelp/ap$(n).html \
|
---|
294 | $(foreach s,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20,HTMLHelp/ap$(n)s$(s).html) ) \
|
---|
295 | HTMLHelp/toc.hhc \
|
---|
296 | HTMLHelp/htmlhelp.hhp \
|
---|
297 | docbook-htmlhelp-formatcfg.xsl \
|
---|
298 | docbook-html-one-page-formatcfg.xsl \
|
---|
299 | docbook-html-chunks-formatcfg.xsl \
|
---|
300 | titlepage-htmlhelp.xsl \
|
---|
301 | UserManual.pdf \
|
---|
302 | VirtualBox.chm \
|
---|
303 | )) \
|
---|
304 | $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
|
---|
305 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf) \
|
---|
306 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm) \
|
---|
307 | $(PATH_STAGE_BIN)/UserManual.pdf \
|
---|
308 | $(PATH_STAGE_BIN)/VirtualBox.chm \
|
---|
309 | \
|
---|
310 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
|
---|
311 | $(VBOX_SDKREF_XML_FILES) \
|
---|
312 | $(VBOX_SDKREF_LATEX_FILES_TARGET) \
|
---|
313 | SDKRef.pdf \
|
---|
314 | ) \
|
---|
315 | $(VBOX_DOC_XIDL_SRC_TMP) \
|
---|
316 | $(VBOX_MANUAL_APIREF_TMP) \
|
---|
317 | $(PATH_STAGE_BIN)/sdk/docs/SDKRef.pdf
|
---|
318 |
|
---|
319 | endif # VBOX_WITH_DOCS
|
---|
320 |
|
---|
321 |
|
---|
322 |
|
---|
323 | #
|
---|
324 | # To avoid network I/O for fetching DTDs, we generate catalogs mapping the public
|
---|
325 | # entity IDs to local files. (Obviously, only done when we have local files.)
|
---|
326 | #
|
---|
327 | ifdef VBOX_XML_CATALOG
|
---|
328 | # Create a catalog file for xsltproc that points to docbook catalog.
|
---|
329 | $(VBOX_XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
330 | $(call MSG_L1,Creating catalog $@)
|
---|
331 | $(QUIET)$(RM) -f [email protected] $@
|
---|
332 | $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
|
---|
333 | $(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">'
|
---|
334 | $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
|
---|
335 | $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
|
---|
336 | $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
|
---|
337 | $(QUIET)$(APPEND) [email protected] ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
|
---|
338 | $(QUIET)$(APPEND) [email protected] ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
|
---|
339 | $(QUIET)$(APPEND) [email protected] '</catalog>'
|
---|
340 | $(QUIET)$(MV) -f [email protected] $@
|
---|
341 |
|
---|
342 | # Create a docbook catalog file for xsltproc that points to the local docbook files.
|
---|
343 | $(VBOX_XML_CATALOG_DOCBOOK): $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
344 | $(call MSG_L1,Creating catalog $@)
|
---|
345 | $(QUIET)$(RM) -f [email protected] $@
|
---|
346 | $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
|
---|
347 | $(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">'
|
---|
348 | $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
|
---|
349 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbpoolx.mod"/>'
|
---|
350 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
|
---|
351 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.4//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
|
---|
352 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbcentx.mod"/>'
|
---|
353 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbnotnx.mod"/>'
|
---|
354 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbgenent.mod"/>'
|
---|
355 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbhierx.mod"/>'
|
---|
356 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/soextblx.dtd"/>'
|
---|
357 | $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/calstblx.dtd"/>'
|
---|
358 | $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
|
---|
359 | $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
|
---|
360 | $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
|
---|
361 | $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
|
---|
362 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsa.ent"/>'
|
---|
363 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsb.ent"/>'
|
---|
364 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsc.ent"/>'
|
---|
365 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsn.ent"/>'
|
---|
366 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amso.ent"/>'
|
---|
367 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsr.ent"/>'
|
---|
368 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-box.ent"/>'
|
---|
369 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr1.ent"/>'
|
---|
370 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr2.ent"/>'
|
---|
371 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-dia.ent"/>'
|
---|
372 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk1.ent"/>'
|
---|
373 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk2.ent"/>'
|
---|
374 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk3.ent"/>'
|
---|
375 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk4.ent"/>'
|
---|
376 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat1.ent"/>'
|
---|
377 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat2.ent"/>'
|
---|
378 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-num.ent"/>'
|
---|
379 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-pub.ent"/>'
|
---|
380 | $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-tech.ent"/>'
|
---|
381 | $(QUIET)$(APPEND) [email protected] '</catalog>'
|
---|
382 | $(QUIET)$(MV) -f [email protected] $@
|
---|
383 | endif
|
---|
384 |
|
---|
385 |
|
---|
386 | ##########################################################################################
|
---|
387 | #
|
---|
388 | # Rules: Preprocess DocBook XML files
|
---|
389 | # (preliminary step for both CHM and PDF generation)
|
---|
390 | #
|
---|
391 | ##########################################################################################
|
---|
392 |
|
---|
393 | #
|
---|
394 | # The following rules for $(VBOX_PATH_MANUAL_OUTBASE)/*.xml process the XML files
|
---|
395 | # in doc/manual to allow for some magic variable replacements. The PDF and CHM
|
---|
396 | # targets do not depend on the XML files in doc/manual, but those in
|
---|
397 | # $(VBOX_PATH_MANUAL_OUTBASE) instead, which we copy there from here, after that magic
|
---|
398 | # processing.
|
---|
399 | #
|
---|
400 | # So, before copying, the following steps are performed:
|
---|
401 | #
|
---|
402 | # -- $VBOX_VERSION_* strings are replaced with the actual current VBox version.
|
---|
403 | # -- $VBOX_MANAGE_OUTPUT (in VBoxManage.xml) is replaced with the current
|
---|
404 | # output of the actual VBoxManage program, to save us from having to
|
---|
405 | # update the manual all the time.
|
---|
406 | #
|
---|
407 |
|
---|
408 | # Only one changelog for all languages
|
---|
409 | # $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG): $(VBOX_PATH_MANUAL_SRC)/$(VBOX_MANUAL_XML_CHANGELOG) | $$(dir $$@)
|
---|
410 | # $(QUIET)$(INSTALL) -m 0644 $< $@
|
---|
411 |
|
---|
412 | # intermediate step to do some variable replacement in the document
|
---|
413 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES)))): \
|
---|
414 | $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
415 | $(call MSG_L1,Pre-processing [1] $(@F) to $@)
|
---|
416 | $(QUIET)$(RM) -f $@ [email protected]
|
---|
417 | $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
|
---|
418 | -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
|
---|
419 | -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
|
---|
420 | -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
|
---|
421 | -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
|
---|
422 | -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
|
---|
423 | -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
|
---|
424 | --output [email protected] $<
|
---|
425 | $(QUIET)$(MV) -f [email protected] $@
|
---|
426 |
|
---|
427 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_ChangeLog.xml): \
|
---|
428 | $(VBOX_PATH_MANUAL_OUTBASE)/% : \
|
---|
429 | $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml | $$(dir $$@)
|
---|
430 | $(call MSG_L1,Pre-processing [3] $(@F) to $@)
|
---|
431 | $(QUIET)$(RM) -f $@ [email protected] [email protected]
|
---|
432 | $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
|
---|
433 | -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
|
---|
434 | -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
|
---|
435 | -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
|
---|
436 | -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
|
---|
437 | -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
|
---|
438 | -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
|
---|
439 | --output [email protected] $<
|
---|
440 | $(QUIET)$(SED) -e '1,/<!--\$$VIRTUALBOX_CHANGELOG_IMPL-->/!d' \
|
---|
441 | -e 's/<!--\$$VIRTUALBOX_CHANGELOG_IMPL-->//' \
|
---|
442 | --output $@ [email protected]
|
---|
443 | var=`$(SED) -n '/!--\$$VIRTUALBOX_CHANGELOG_IMPL-->/p' $<`; \
|
---|
444 | test -n "$${var}" \
|
---|
445 | && $(SED) -e 's/<?xml version=\"1.0\" encoding=\"UTF-8\"?>//g' \
|
---|
446 | --append $@ $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml; \
|
---|
447 | true
|
---|
448 | $(QUIET)$(SED) -e '/<!--\$$VIRTUALBOX_CHANGELOG_IMPL-->/,$$!d' \
|
---|
449 | -e 's/<!--\$$VIRTUALBOX_CHANGELOG_IMPL-->//' --append $@ [email protected]
|
---|
450 | $(QUIET)$(RM) -f -- "[email protected]"
|
---|
451 |
|
---|
452 | # TODO: figure why the rule below doesn't cause kmk to rebuild the manual when a man page changes!
|
---|
453 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES), \
|
---|
454 | $(eval $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_VBoxManage.xml: $(VBOX_PATH_MANUAL_SRC)/$(lang)/user_VBoxManage.xml \
|
---|
455 | $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES)))))
|
---|
456 |
|
---|
457 | # user_VBoxManage.xml currently needs some extra processing to stitch in the VBoxManage usage blob.
|
---|
458 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_VBoxManage.xml): \
|
---|
459 | $(VBOX_PATH_MANUAL_OUTBASE)/% : \
|
---|
460 | $(VBOX_PATH_MANUAL_SRC)/% \
|
---|
461 | $$(addprefix $$(@D)/,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
|
---|
462 | $(VBOX_XML_CATALOG) \
|
---|
463 | $(VBOX_XML_CATALOG_DOCBOOK) \
|
---|
464 | $(VBOXMANAGEHELP_PATH) | $$(dir $$@)
|
---|
465 | $(call MSG_L1,Pre-processing [2] $(@F) to $@)
|
---|
466 | $(QUIET)$(RM) -f $@ [email protected] [email protected]
|
---|
467 | $(QUIET)$(SED) \
|
---|
468 | -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
|
---|
469 | -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
|
---|
470 | -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
|
---|
471 | -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
|
---|
472 | -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
|
---|
473 | -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
|
---|
474 | -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
|
---|
475 | -e 's|@VBOX_PATH_DOCBOOK@|$(VBOX_PATH_DOCBOOK)|g' \
|
---|
476 | -e 's|@VBOX_PATH_MANUAL_SRC@|$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
477 | --output [email protected] $<
|
---|
478 | $(QUIET)$(SED) \
|
---|
479 | -e '1,/\$$VBOX_MANAGE_OUTPUT/!d' \
|
---|
480 | -e 's/\$$VBOX_MANAGE_OUTPUT.*//' \
|
---|
481 | --output [email protected] [email protected]
|
---|
482 | $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
|
---|
483 | $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
|
---|
484 | -- \
|
---|
485 | $(VBOXMANAGEHELP_PATH) --dumpopts
|
---|
486 | $(QUIET)$(SED) -e 's/</\</g' -e 's/>/\>/g' --append [email protected] [email protected]
|
---|
487 | $(QUIET)$(SED) \
|
---|
488 | -e '/\$$VBOX_MANAGE_OUTPUT/,$$!d' \
|
---|
489 | -e 's/.*\$$VBOX_MANAGE_OUTPUT//' \
|
---|
490 | --append [email protected] [email protected]
|
---|
491 | if 0 # Not currently needed.
|
---|
492 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output $@ \
|
---|
493 | $(VBOX_PATH_MANUAL_SRC)/usage-to-docbook-manual.xsl \
|
---|
494 | [email protected]
|
---|
495 | else
|
---|
496 | $(QUIET)$(CP) [email protected] $@
|
---|
497 | endif
|
---|
498 | $(QUIET)$(RM) -f [email protected] [email protected] [email protected]
|
---|
499 |
|
---|
500 |
|
---|
501 | # Morph man pages into manual sections.
|
---|
502 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$(VBOX_MANUAL_XML_REFENTRY_FILES))): \
|
---|
503 | $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% \
|
---|
504 | $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
|
---|
505 | $(VBOX_VERSION_STAMP) | $$(dir $$@)
|
---|
506 | $(call MSG_GENERATE,,$@,$<)
|
---|
507 | $(QUIET)$(RM) -f $@
|
---|
508 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output $@ \
|
---|
509 | $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $<
|
---|
510 |
|
---|
511 |
|
---|
512 | $(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
513 | $(call MSG_L1,Generating $@)
|
---|
514 | $(QUIET)$(SED) -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
|
---|
515 | -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
|
---|
516 | --output $@ $<
|
---|
517 |
|
---|
518 | # generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
|
---|
519 | $(VBOX_MANUAL_APIREF_TMP): $(VBOX_DOC_XIDL_SRC_TMP) $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl
|
---|
520 | $(call MSG_L1,Generating $@)
|
---|
521 | $(QUIET)$(VBOX_XSLTPROC) --xinclude -o $@ $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
|
---|
522 |
|
---|
523 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.xml: \
|
---|
524 | $(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef.xml $(VBOX_MANUAL_APIREF_TMP) \
|
---|
525 | | $$(dir $$@)
|
---|
526 | $(call MSG_L1,Pre-processing [2] $(@F) to $@)
|
---|
527 | $(QUIET)$(RM) -f $@ [email protected]
|
---|
528 | $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
|
---|
529 | -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
|
---|
530 | -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
|
---|
531 | -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
|
---|
532 | -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
|
---|
533 | -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
|
---|
534 | -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
|
---|
535 | --output [email protected] $<
|
---|
536 | $(QUIET)$(SED) -e '1,/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/!d' \
|
---|
537 | -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' \
|
---|
538 | --output $@ [email protected]
|
---|
539 | $(QUIET)$(SED) -e 's/<?xml version=\"1.0\" encoding=\"utf-8\"?>//g' --append $@ $(VBOX_MANUAL_APIREF_TMP)
|
---|
540 | $(QUIET)$(SED) -e '/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/,$$!d' \
|
---|
541 | -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' --append $@ [email protected]
|
---|
542 | # $(QUIET)$(MV) -f [email protected] $@
|
---|
543 | $(QUIET)$(RM) -f -- "[email protected]"
|
---|
544 |
|
---|
545 |
|
---|
546 | ##########################################################################################
|
---|
547 | #
|
---|
548 | # Shared rules for PDF generation
|
---|
549 | #
|
---|
550 | ##########################################################################################
|
---|
551 |
|
---|
552 | ifndef VBOX_OSE
|
---|
553 | # copy ucs.sty and related files
|
---|
554 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/ucs.sty):
|
---|
555 | $(call MSG_L1,Copying unicode support for LaTeX)
|
---|
556 | $(QUIET)$(INSTALL_STAGING) -- $(VBOX_MANUAL_TEX_UNICODE_FILES) "$(@D)"
|
---|
557 | endif
|
---|
558 |
|
---|
559 | # copy the PNG files.
|
---|
560 | # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
|
---|
561 | define def_vbox_cp_images_pdf
|
---|
562 | local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
|
---|
563 | $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
|
---|
564 | $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
|
---|
565 | $$(call MSG_L1,Copying temporary $$< => $$@)
|
---|
566 | $$(QUIET)$$(INSTALL_STAGING) -- '$$<' '$$(@D)'
|
---|
567 | endef
|
---|
568 |
|
---|
569 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_pdf)))
|
---|
570 |
|
---|
571 |
|
---|
572 | ##########################################################################################
|
---|
573 | #
|
---|
574 | # UserManual.pdf
|
---|
575 | #
|
---|
576 | ##########################################################################################
|
---|
577 |
|
---|
578 | ## @todo INSTALLS target for this!
|
---|
579 | $(PATH_STAGE_BIN)/UserManual.pdf: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf | $$(dir $$@)
|
---|
580 | $(QUIET)$(CP) $< $@
|
---|
581 | $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
|
---|
582 |
|
---|
583 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf): \
|
---|
584 | $(PATH_STAGE_BIN)/UserManual_%.pdf : $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf
|
---|
585 | $(QUIET)$(CP) $< $@
|
---|
586 | $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
|
---|
587 |
|
---|
588 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf): \
|
---|
589 | $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf : \
|
---|
590 | $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex \
|
---|
591 | $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/%/ucs.sty) \
|
---|
592 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
|
---|
593 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) | $$(dir $$@)
|
---|
594 | # PDF generation via Latex: generate the .tex file
|
---|
595 | $(call MSG_L1,pdflatex $< (four passes) -> $@)
|
---|
596 | $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
|
---|
597 | $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
|
---|
598 | $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
|
---|
599 | $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
|
---|
600 | $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
|
---|
601 | $(QUIET)$(SED) -n \
|
---|
602 | -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
|
---|
603 | $(basename $@).log
|
---|
604 |
|
---|
605 | ##@todo restore this when above has been converted to INSTALLS target. $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
|
---|
606 |
|
---|
607 | # generate temporary LaTeX source from processed XML
|
---|
608 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.tex): \
|
---|
609 | $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex : \
|
---|
610 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
|
---|
611 | $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
|
---|
612 | $(MAKEFILE_CURRENT)
|
---|
613 | $(call MSG_L1,Generating $@ from DocBook XML)
|
---|
614 | $(QUIET)$(RM) -f $(addprefix $(@D)/,$(VBOX_MANUAL_LATEX_FILES_TARGET))
|
---|
615 | # generate TeX source from processed docbook and store it in UserManual.tex.tmp;
|
---|
616 | # pass current language to xsltproc in TARGETLANG variable (extract it from the
|
---|
617 | # current directory, should become "de_DE" or the like)
|
---|
618 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG $(notdir $(@D)) \
|
---|
619 | -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
|
---|
620 | # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
|
---|
621 | # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
|
---|
622 | $(QUIET)$(SED) \
|
---|
623 | -e 's|^\\QUOTE{}|\\OQ{}|g' \
|
---|
624 | -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
|
---|
625 | -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
|
---|
626 | --output $@ [email protected]
|
---|
627 | $(QUIET)$(RM) -f [email protected]
|
---|
628 |
|
---|
629 |
|
---|
630 | #
|
---|
631 | # SDKRef.pdf
|
---|
632 | #
|
---|
633 | $(VBOX_PATH_SDK)/docs/SDKRef.pdf: \
|
---|
634 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
|
---|
635 | $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
|
---|
636 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
|
---|
637 | # PDF generation via Latex: generate the .tex file
|
---|
638 | $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/docs
|
---|
639 | $(call MSG_L1,pdflatex $< (three passes))
|
---|
640 | $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
|
---|
641 | $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
|
---|
642 | $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
|
---|
643 | $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
|
---|
644 | $(QUIET)$(SED) -n \
|
---|
645 | -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
|
---|
646 | $(basename $<).log
|
---|
647 | $(QUIET)$(CP) $(<D)/SDKRef.pdf $@
|
---|
648 | $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
|
---|
649 |
|
---|
650 | # generate temporary LaTeX source from processed XML
|
---|
651 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
|
---|
652 | $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $(MAKEFILE_CURRENT)
|
---|
653 | $(call MSG_L1,Generating $@ from DocBook XML)
|
---|
654 | $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
|
---|
655 | # generate TeX source from processed docbook and store it in SDKRef.tex.tmp
|
---|
656 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG en_US \
|
---|
657 | -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
|
---|
658 | # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
|
---|
659 | # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
|
---|
660 | $(QUIET)$(SED) \
|
---|
661 | -e 's|^\\QUOTE{}|\\OQ{}|g' \
|
---|
662 | -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
|
---|
663 | -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
|
---|
664 | --output $@ [email protected]
|
---|
665 | $(QUIET)$(RM) -f [email protected]
|
---|
666 |
|
---|
667 |
|
---|
668 |
|
---|
669 | ifdef VBOX_WITH_DOCS_CHM
|
---|
670 | #
|
---|
671 | # VirtualBox.chm
|
---|
672 | #
|
---|
673 | # We first generate a .hhp help source file from the preprocessed
|
---|
674 | # DocBook XML files, as defined above, then feed that into the
|
---|
675 | # Microsoft Help Compiler.
|
---|
676 | #
|
---|
677 | $(PATH_STAGE_BIN)/VirtualBox.chm: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
|
---|
678 | $(QUIET)$(CP) $< $@
|
---|
679 | $(call MSG_L1,Fresh CHM is now at $@)
|
---|
680 |
|
---|
681 | $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm): \
|
---|
682 | $(PATH_STAGE_BIN)/VirtualBox_%.chm : $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm
|
---|
683 | $(QUIET)$(CP) $< $@
|
---|
684 | $(call MSG_L1,Fresh CHM is now at $@)
|
---|
685 |
|
---|
686 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm): \
|
---|
687 | $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm: \
|
---|
688 | $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp \
|
---|
689 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f))))
|
---|
690 | $(call MSG_L1,hhc $<,=> $@)
|
---|
691 | $(QUIET)$(RM) -f $@
|
---|
692 | $(QUIET)$(VBOX_HHC) $(subst /,\\,$<)
|
---|
693 |
|
---|
694 |
|
---|
695 | # intermediate step to do some variable replacement in the XSL configuration
|
---|
696 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/docbook-htmlhelp-formatcfg.xsl): \
|
---|
697 | $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
698 | $(call MSG_GENERATE,,$@,$<)
|
---|
699 | $(QUIET)$(RM) -f $@
|
---|
700 | $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(VBOX_PATH_DOCBOOK)|g' \
|
---|
701 | -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
702 | -e 's|\$$TARGETPATH|$(@D)|g' --output $@ $<
|
---|
703 |
|
---|
704 | # Prepare the XSL file for our title page, htmlhelp variant.
|
---|
705 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/titlepage-htmlhelp.xsl): \
|
---|
706 | $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
707 | $(call MSG_L1,xsltproc $<)
|
---|
708 | $(QUIET)$(RM) -f [email protected] $@
|
---|
709 | $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
|
---|
710 | $(QUIET)$(MV) -f [email protected] $@
|
---|
711 |
|
---|
712 |
|
---|
713 | $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/htmlhelp.hhp): \
|
---|
714 | $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp: \
|
---|
715 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
|
---|
716 | $(VBOX_PATH_MANUAL_OUTBASE)/%/docbook-htmlhelp-formatcfg.xsl \
|
---|
717 | $(VBOX_PATH_MANUAL_OUTBASE)/%/titlepage-htmlhelp.xsl \
|
---|
718 | $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK)
|
---|
719 | $(call MSG_L1,xsltproc $<,=> $@)
|
---|
720 | $(QUIET)$(RM) -f $@
|
---|
721 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
722 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output $(@D)/ \
|
---|
723 | --stringparam htmlhelp.chm \
|
---|
724 | $(subst /,\\,$(@D)/../VirtualBox.chm) \
|
---|
725 | $(HTMLHELPOPTS) $(@D)/../docbook-htmlhelp-formatcfg.xsl \
|
---|
726 | $<
|
---|
727 |
|
---|
728 | # copy the PNG files.
|
---|
729 | # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
|
---|
730 | define def_vbox_cp_images_html
|
---|
731 | local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/HTMLHelp
|
---|
732 | $$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
|
---|
733 | $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
|
---|
734 | $$(call MSG_L1,Copying temporary $$< => $$@)
|
---|
735 | $$(QUIET)$$(CP) -f $$< $$@
|
---|
736 | endef
|
---|
737 |
|
---|
738 | $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_html)))
|
---|
739 |
|
---|
740 | # Packing the docs into a zip file
|
---|
741 | $(PATH_STAGE_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
|
---|
742 | $(call MSG_L1,Packing documentation $@)
|
---|
743 | $(QUIET)$(RM) -f $@
|
---|
744 | $(QUIET)$(REDIRECT) -C $(PATH_STAGE_BIN) -- zip$(HOSTSUFF_EXE) -9 $@ $(notdir $^)
|
---|
745 |
|
---|
746 | endif # VBOX_WITH_DOCS_CHM
|
---|
747 |
|
---|
748 |
|
---|
749 | ##########################################################################################
|
---|
750 | #
|
---|
751 | # UserManual.html
|
---|
752 | #
|
---|
753 | ##########################################################################################
|
---|
754 |
|
---|
755 | # intermediate step to do some variable replacement in the XSL configuration
|
---|
756 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl: \
|
---|
757 | $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
758 | $(call MSG_L1,Pre-processing $(@F) to $@)
|
---|
759 | $(QUIET)$(RM) -f [email protected] $@
|
---|
760 | $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(VBOX_PATH_DOCBOOK)|g' \
|
---|
761 | -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
762 | -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
|
---|
763 | $(QUIET)$(MV) -f [email protected] $@
|
---|
764 |
|
---|
765 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl: \
|
---|
766 | $(VBOX_PATH_MANUAL_SRC)/docbook-html-chunks-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
767 | $(call MSG_L1,Pre-processing $(@F) to $@)
|
---|
768 | $(QUIET)$(RM) -f [email protected] $@
|
---|
769 | $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(VBOX_PATH_DOCBOOK)|g' \
|
---|
770 | -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
771 | -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
|
---|
772 | $(QUIET)$(MV) -f [email protected] $@
|
---|
773 |
|
---|
774 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
|
---|
775 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
|
---|
776 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
|
---|
777 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
|
---|
778 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
|
---|
779 | $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
|
---|
780 | | $$(dir $$@)
|
---|
781 | $(call MSG_L1,xsltproc $<)
|
---|
782 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet \
|
---|
783 | --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
|
---|
784 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
|
---|
785 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
|
---|
786 |
|
---|
787 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
|
---|
788 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
|
---|
789 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
|
---|
790 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
|
---|
791 | $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
|
---|
792 | $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
|
---|
793 | | $$(dir $$@)
|
---|
794 | $(call MSG_L1,xsltproc $<)
|
---|
795 | $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet \
|
---|
796 | --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
|
---|
797 | --stringparam chunk.section.depth 0 \
|
---|
798 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
|
---|
799 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
|
---|
800 |
|
---|
801 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
|
---|
802 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
|
---|
803 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
|
---|
804 | $(call MSG_L1,Packing documentation $@)
|
---|
805 | $(QUIET)$(RM) -f $@
|
---|
806 | $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- zip$(HOSTSUFF_EXE) \
|
---|
807 | -9 -r $@ html-single html-chunks $(VBOX_MANUAL_PNG_FILES_en_US)
|
---|
808 |
|
---|
809 | html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
|
---|
810 |
|
---|
811 | html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
|
---|
812 |
|
---|
813 | html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
|
---|
814 |
|
---|
815 | ##########################################################################################
|
---|
816 | #
|
---|
817 | # ChangeLog.html
|
---|
818 | #
|
---|
819 | ##########################################################################################
|
---|
820 |
|
---|
821 | # intermediate step to do some variable replacement in the XSL configuration
|
---|
822 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl: \
|
---|
823 | $(VBOX_PATH_MANUAL_SRC)/docbook-changelog-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
824 | $(call MSG_L1,Pre-processing $(@F) to $@)
|
---|
825 | $(QUIET)$(RM) -f [email protected] $@
|
---|
826 | $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(VBOX_PATH_DOCBOOK)|g' \
|
---|
827 | -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
|
---|
828 | -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
|
---|
829 | $(QUIET)$(MV) -f [email protected] $@
|
---|
830 |
|
---|
831 | # This XSLT rule depends on $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml, which is build by the complex rule
|
---|
832 | # $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_ChangeLog.xml): ...
|
---|
833 | # much further above. That rule takes en_US/user_ChangeLog.xml and replaces $VIRTUALBOX_CHANGELOG_IMPL
|
---|
834 | # with the actual change log contained in user_ChangeLogImpl.xml
|
---|
835 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
|
---|
836 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl \
|
---|
837 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml
|
---|
838 | $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html \
|
---|
839 | $(@D)/docbook-changelog-formatcfg.xsl \
|
---|
840 | $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml
|
---|
841 | $(call MSG_L1,Fresh ChangeLog.html is now at $@)
|
---|
842 |
|
---|
843 | cl-html: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
|
---|
844 |
|
---|
845 |
|
---|
846 | ##########################################################################################
|
---|
847 | #
|
---|
848 | # VBoxManage man pages.
|
---|
849 | #
|
---|
850 | ##########################################################################################
|
---|
851 | $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-man.xsl,)
|
---|
852 |
|
---|
853 | man-experiment: \
|
---|
854 | $(VBOX_PATH_MANUAL_SRC)/en_US/man_VBoxManage_extpack.xml \
|
---|
855 | $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-man.xsl \
|
---|
856 | $(VBOX_XML_CATALOG) \
|
---|
857 | $(VBOX_XML_CATALOG_DOCBOOK)
|
---|
858 | $(VBOX_XSLTPROC_WITH_CAT) --xinclude --nonet --output z:/tmp/vboxmanage-extpack.1 \
|
---|
859 | $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-man.xsl \
|
---|
860 | $(VBOX_PATH_MANUAL_SRC)/en_US/man_VBoxManage_extpack.xml
|
---|
861 |
|
---|
862 |
|
---|
863 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
864 |
|
---|