VirtualBox

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

Last change on this file since 68352 was 68352, checked in by vboxsync, 8 years ago

manual/Makefile.kmk: cleaned up and addressed the todos, now all manuals are using INSTALLS targets

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 46.3 KB
Line 
1# $Id: Makefile.kmk 68352 2017-08-09 13:42:58Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox User Manual, SDK reference and other manuals.
4#
5
6#
7# Copyright (C) 2006-2016 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
48SUB_DEPTH = ../..
49include $(KBUILD_PATH)/subheader.kmk
50
51
52#
53# Globals
54#
55
56# Error out if someone tries to override old globals.
57ifdef HTMLHELPOPTS
58 $(error HTMLHELPOPTS was renamed to VBOX_HTMLHELP_OPTS!)
59endif
60ifdef DOCBOOKPATH
61 $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
62endif
63ifdef DOCBOOKPATH
64 $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
65endif
66ifdef XML_CATALOG
67 $(error XML_CATALOG was renamed to VBOX_XML_CATALOG!)
68endif
69ifdef XML_CATALOG_DOCBOOK
70 $(error XML_CATALOG_DOCBOOK was renamed to VBOX_XML_CATALOG_DOCBOOK!)
71endif
72ifdef VBOXMANAGEPATH
73 $(error VBOXMANAGEPATH was renamed to VBOXMANAGEHELP_PATH!)
74endif
75ifdef PDFLATEX_INTERACTION
76 $(error PDFLATEX_INTERACTION was renamed to VBOX_PDFLATEX_INTERACTION!)
77endif
78ifdef PDFLATEX
79 $(error PDFLATEX was renamed to VBOX_PDFLATEX_CMD!)
80endif
81ifdef HHC
82 $(error HHC was renamed to VBOX_HHC!)
83endif
84
85# Source and output locations.
86VBOX_PATH_MANUAL_SRC := $(PATH_SUB_CURRENT)
87VBOX_PATH_MANUAL_OUTBASE := $(PATH_TARGET)/manual
88
89# tool locations
90ifndef 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
96else
97 # use docbook of the build host
98 VBOX_PATH_DOCBOOK ?= http://docbook.sourceforge.net/release/xsl/current/
99endif
100
101# xsltproc with the catalog trick if applicable.
102ifdef VBOX_XML_CATALOG
103 VBOX_XSLTPROC_WITH_CAT = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" $1 -- \
104 $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS)
105 VBOX_XMLLINT_WITH_CAT = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" -- \
106 $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS)
107else
108 VBOX_XSLTPROC_WITH_CAT = $(if $(1), $(REDIRECT) $1 --,) $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS)
109 VBOX_XMLLINT_WITH_CAT = $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS)
110endif
111
112VBOXMANAGEHELP_PATH ?= $(PATH_STAGE_BIN)/VBoxManageHelp$(SUFF_EXE)
113
114 # VBOX_PDFLATEX_INTERACTION = errorstopmode - Use this when you wants to figure out build failures
115 # without catting the log a million times.
116VBOX_PDFLATEX_INTERACTION ?= batchmode
117ifeq ($(KBUILD_HOST),win)
118 ifndef VBOX_PDFLATEX
119 VBOX_PDFLATEX := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/miktex-portable/*/miktex/bin/pdflatex.exe)))
120 ifneq ($(VBOX_PDFLATEX),)
121 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION)
122 endif
123 endif
124 ifndef VBOX_PDFLATEX
125 # Tell MiKTeX to automatically download packages if system wide install.
126 VBOX_PDFLATEX := pdflatex
127 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION) --enable-installer
128 endif
129else
130 VBOX_PDFLATEX ?= pdflatex
131 VBOX_PDFLATEX_HALT = $(shell ( $(VBOX_PDFLATEX) -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
132 VBOX_PDFLATEX_CMD = pdflatex $(VBOX_PDFLATEX_HALT) -interaction $(VBOX_PDFLATEX_INTERACTION)
133endif
134
135# Windows HTML Help Workshop compiler (stupid thing always returns an error!)
136VBOX_HHC = -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe
137
138
139# Additional xsltproc options when generating
140VBOX_HTMLHELP_OPTS ?=
141
142# SDK related globals.
143VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
144VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
145VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
146
147##
148# Non-pattern-rule approach to editing XSLT files.
149# $(evalcall2 def_vbox_replace_paths_in_xslt)
150# @param 1 The XSLT source file (relative to Makefile dir).
151# @param 2 Optional output subdirectory (leading slash).
152define def_vbox_replace_paths_in_xslt
153OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1)
154$$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 | $$$$(dir $$$$@)
155 $$(call MSG_L1,Pre-processing $$(<) to $$(@))
156 $$(QUIET)$$(SED) \
157 -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
158 -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
159 -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
160 -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$2|g' \
161 --output "$$(@)" $$<
162endef
163
164##
165# Non-pattern-rule approach to editing XML files.
166# $(evalcall2 def_vbox_replace_stuff_in_xml)
167# @param 1 The XSLT source file (relative to Makefile dir).
168# @param 2 Optional output subdirectory (leading slash).
169#
170define def_vbox_replace_stuff_in_xml
171OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1)
172$$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
173 $$(call MSG_L1,Pre-processing $$(<) to $$(@))
174 $$(QUIET)$$(SED) \
175 -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
176 -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
177 -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
178 -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$2|g' \
179 \
180 -e 's/@VBOX_VERSION_MAJOR@/$$(VBOX_VERSION_MAJOR)/g' \
181 -e 's/@VBOX_VERSION_MINOR@/$$(VBOX_VERSION_MINOR)/g' \
182 -e 's/@VBOX_VERSION_BUILD@/$$(VBOX_VERSION_BUILD)/g' \
183 -e 's/@VBOX_VERSION_STRING@/$$(VBOX_VERSION_STRING)/g' \
184 -e 's/@VBOX_VENDOR@/$$(VBOX_VENDOR)/g' \
185 -e 's/@VBOX_PRODUCT@/$$(VBOX_PRODUCT)/g' \
186 -e 's/@VBOX_C_YEAR@/$$(VBOX_C_YEAR)/g' \
187 \
188 --output "$$(@)" $$<
189endef
190
191## List of refentry files (manpages).
192VBOX_MANUAL_XML_REFENTRY_FILES = \
193 man_VBoxManage-debugvm.xml \
194 man_VBoxManage-extpack.xml \
195 man_VBoxManage-unattended.xml
196
197
198#
199# Targets
200#
201
202BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE) $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, $(VBOX_MANUAL_LANGUAGES))
203
204
205if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
206 if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
207 INSTALLS += VBox-sdkref-docs
208 VBox-sdkref-docs_INST = $(INST_SDK)docs/
209 VBox-sdkref-docs_MODE = a+r,u+w
210 VBox-sdkref-docs_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf
211 VBox-sdkref-docs_CLEAN = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf
212 endif
213
214 ifdef VBOX_WITH_DOCS_CHM
215 INSTALLS += VBox-usermanual-chm-docs
216 VBox-usermanual-chm-docs_INST = $(INST_BIN)
217 VBox-usermanual-chm-docs_MODE = a+r,u+w
218 VBox-usermanual-chm-docs_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
219 VBox-usermanual-chm-docs_CLEAN = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
220
221 VBOX_PATH_BIN_CHM = $(PATH_STAGE_BIN)/VirtualBox.chm
222 else # Do not build chm.
223 VBOX_PATH_BIN_CHM =
224 endif
225
226 ifndef VBOX_ONLY_SDK
227 VBOX_MANUAL_PACK += \
228 $(PATH_STAGE_BIN)/UserManual.pdf \
229 $(VBOX_PATH_BIN_CHM)
230 INSTALLS += VBox-usermanual-docs
231 VBox-usermanual-docs_INST = $(INST_BIN)
232 VBox-usermanual-docs_MODE = a+r,u+w
233 VBox-usermanual-docs_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf
234 VBox-usermanual-docs_CLEAN = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf
235
236 ifdef VBOX_WITH_DOCS_TRANSLATIONS
237 INSTALLS += VBox-usermanual-add-docs
238 VBox-usermanual-add-docs_INST = $(INST_BIN)
239 VBox-usermanual-add-docs_MODE = a+r,u+w
240 VBox-usermanual-add-docs_SOURCES = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/UserManual.pdf=>UserManual_$(f).pdf)
241 VBox-usermanual-add-docs_CLEAN = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/UserManual.pdf)
242 VBOX_MANUAL_PACK += \
243 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf)
244 ifdef VBOX_WITH_DOCS_CHM
245 INSTALLS += VBox-usermanual-add-chm-docs
246 VBox-usermanual-add-chm-docs_INST = $(INST_BIN)
247 VBox-usermanual-add-chm-docs_MODE = a+r,u+w
248 VBox-usermanual-add-chm-docs_SOURCES = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/VirtualBox.chm=>VirtualBox_$(f).chm)
249 VBox-usermanual-add-chm-docs_CLEAN = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/VirtualBox.chm)
250 VBOX_MANUAL_PACK += \
251 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm)
252 endif
253 endif
254 endif # !VBOX_ONLY_SDK
255 ifdef VBOX_ONLY_DOCS
256 PACKING += $(PATH_STAGE_BIN)/VBoxDocumentation.zip
257 endif
258
259 ifdef VBOX_WITH_DOCS_TRANSLATIONS
260 VBOX_MANUAL_LANGUAGES += $(VBOX_MANUAL_ADD_LANGUAGES)
261 endif
262
263 VBOX_MANUAL_XML_CHANGELOG = \
264 user_ChangeLogImpl.xml
265
266 VBOX_MANUAL_XML_FILES = \
267 UserManual.xml \
268 user_AdvancedTopics.xml \
269 user_BasicConcepts.xml \
270 user_Glossary.xml \
271 user_Frontends.xml \
272 user_Installation.xml \
273 user_GuestAdditions.xml \
274 user_Introduction.xml \
275 user_KnownIssues.xml \
276 user_PrivacyPolicy.xml \
277 user_Security.xml \
278 user_Technical.xml \
279 user_ThirdParty.xml \
280 user_Troubleshooting.xml \
281 user_VBoxManage.xml \
282 user_VirtualBoxAPI.xml \
283 user_Storage.xml \
284 user_Networking.xml
285
286 VBOX_MANUAL_XML_FILES_INCL_CHANGELOG = $(VBOX_MANUAL_XML_FILES) \
287 user_ChangeLog.xml
288
289 VBOX_SDKREF_XML_FILES = \
290 SDKRef.xml
291
292 # Wildcard the images path for every supported language
293 $(foreach f,$(VBOX_MANUAL_LANGUAGES), \
294 $(eval VBOX_MANUAL_PNG_FILES_$$(f) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(f)/%,%,$$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(f)/images/*.png))))
295
296 VBOX_MANUAL_TEX_UNICODE_FILES = \
297 $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
298
299 VBOX_MANUAL_LATEX_FILES_TARGET = \
300 $(addprefix UserManual.,aux log out toc tex)
301
302 VBOX_SDKREF_LATEX_FILES_TARGET = \
303 $(addprefix SDKRef.,aux log out toc tex)
304
305 BLDDIRS += \
306 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,\
307 $(addsuffix /images, $(VBOX_MANUAL_LANGUAGES)) \
308 $(addsuffix /html-single, $(VBOX_MANUAL_LANGUAGES)) \
309 $(addsuffix /html-chunks, $(VBOX_MANUAL_LANGUAGES)) \
310 $(addsuffix /HTMLHelp, $(VBOX_MANUAL_LANGUAGES)) \
311 $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_LANGUAGES)) \
312 )
313
314 OTHER_CLEAN += \
315 $(VBOX_XML_CATALOG) \
316 $(VBOX_XML_CATALOG_DOCBOOK) \
317 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
318 $(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG) \
319 $(VBOX_MANUAL_XML_REFENTRY_FILES) \
320 $(addprefix user_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
321 $(patsubst man_%,%.1,$(basename $(VBOX_MANUAL_XML_REFENTRY_FILES))) \
322 $(VBOX_MANUAL_LATEX_FILES_TARGET) \
323 $(VBOX_MANUAL_PNG_FILES_$(lang)) \
324 $(notdir $(VBOX_MANUAL_TEX_UNICODE_FILES)) \
325 $(addprefix HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(lang))) \
326 html-single/UserManual.html \
327 $(addprefix HTMLHelp/, index.html go01.html) \
328 $(addprefix html-chunks/, index.html go01.html) \
329 $(foreach n,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 \
330 ,html-chunks/ch$(n).html \
331 html-chunks/re$(n).html \
332 HTMLHelp/ch$(n).html \
333 HTMLHelp/re$(n).html \
334 $(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)) ) \
335 $(foreach n,a b c \
336 ,html-chunks/ap$(n).html \
337 HTMLHelp/ap$(n).html \
338 $(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) ) \
339 HTMLHelp/toc.hhc \
340 HTMLHelp/htmlhelp.hhp \
341 titlepage-htmlhelp.xsl \
342 ChangeLog.html \
343 validatemanual.run \
344 )) \
345 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
346 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
347 $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml \
348 \
349 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
350 $(VBOX_SDKREF_XML_FILES) \
351 $(VBOX_SDKREF_LATEX_FILES_TARGET) \
352 ) \
353 $(VBOX_DOC_XIDL_SRC_TMP) \
354 $(VBOX_MANUAL_APIREF_TMP)
355
356endif # if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
357
358
359
360#
361# To avoid network I/O for fetching DTDs, we generate catalogs mapping the public
362# entity IDs to local files. (Obviously, only done when we have local files.)
363#
364ifdef VBOX_XML_CATALOG
365# Create a catalog file for xsltproc that points to docbook catalog.
366$(VBOX_XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@)
367 $(call MSG_L1,Creating catalog $@)
368 $(QUIET)$(RM) -f [email protected] $@
369 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
370 $(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">'
371 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
372 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
373 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
374 $(QUIET)$(APPEND) [email protected] ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
375 $(QUIET)$(APPEND) [email protected] ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
376 $(QUIET)$(APPEND) [email protected] '</catalog>'
377 $(QUIET)$(MV) -f [email protected] $@
378
379# Create a docbook catalog file for xsltproc that points to the local docbook files.
380$(VBOX_XML_CATALOG_DOCBOOK): $(MAKEFILE_CURRENT) | $$(dir $$@)
381 $(call MSG_L1,Creating catalog $@)
382 $(QUIET)$(RM) -f [email protected] $@
383 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
384 $(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">'
385 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
386 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbpoolx.mod"/>'
387 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
388 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.4//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
389 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbcentx.mod"/>'
390 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbnotnx.mod"/>'
391 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbgenent.mod"/>'
392 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbhierx.mod"/>'
393 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/soextblx.dtd"/>'
394 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/calstblx.dtd"/>'
395 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
396 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
397 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
398 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
399 $(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"/>'
400 $(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"/>'
401 $(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"/>'
402 $(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"/>'
403 $(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"/>'
404 $(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"/>'
405 $(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"/>'
406 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr1.ent"/>'
407 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr2.ent"/>'
408 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-dia.ent"/>'
409 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk1.ent"/>'
410 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk2.ent"/>'
411 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk3.ent"/>'
412 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk4.ent"/>'
413 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat1.ent"/>'
414 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat2.ent"/>'
415 $(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"/>'
416 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-pub.ent"/>'
417 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-tech.ent"/>'
418 $(QUIET)$(APPEND) [email protected] '</catalog>'
419 $(QUIET)$(MV) -f [email protected] $@
420endif
421
422
423if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
424
425
426##########################################################################################
427#
428# Rules: Preprocess DocBook XML files
429# (preliminary step for both CHM and PDF generation)
430#
431##########################################################################################
432
433#
434# The following rules for $(VBOX_PATH_MANUAL_OUTBASE)/*.xml process the XML files
435# in doc/manual to allow for some magic variable replacements. The PDF and CHM
436# targets do not depend on the XML files in doc/manual, but those in
437# $(VBOX_PATH_MANUAL_OUTBASE) instead, which we copy there from here, after that magic
438# processing.
439#
440# So, before copying, the following steps are performed:
441#
442# -- $VBOX_VERSION_* strings are replaced with the actual current VBox version.
443# -- $VBOX_MANAGE_OUTPUT (in VBoxManage.xml) is replaced with the current
444# output of the actual VBoxManage program, to save us from having to
445# update the manual all the time.
446#
447
448# Only one changelog for all languages
449# $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG): $(VBOX_PATH_MANUAL_SRC)/$(VBOX_MANUAL_XML_CHANGELOG) | $$(dir $$@)
450# $(QUIET)$(INSTALL) -m 0644 $< $@
451
452# Manual dependency on user_ChangeLogImpl.xml
453$(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
454,$(eval $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_ChangeLog.xml: $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml))
455
456# Manual dependency for user_VBoxManage.xml.
457$(foreach lang,$(VBOX_MANUAL_LANGUAGES), \
458$(eval $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_VBoxManage.xml: $(VBOX_PATH_MANUAL_SRC)/$(lang)/user_VBoxManage.xml \
459 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
460 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
461 $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml ))
462
463# Intermediate step to do some variable replacement in the document.
464$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG) \
465,$(evalcall2 def_vbox_replace_stuff_in_xml,/$(lang)/$(file),/$(lang))))
466
467##
468# Morph man pages into manual sections.
469# $(evalcall2 def_vbox_refentry_to_user_sect1)
470# @param 1 The XSLT source file (relative to Makefile dir).
471# @param 2 Optional output subdirectory.
472define def_vbox_refentry_to_user_sect1
473$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): \
474 $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
475 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
476 $$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
477 $$(VBOX_VERSION_STAMP) | $$(dir $$@)
478 $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(filter %.xml,$$^),$$@)
479 $$(QUIET)$$(RM) -f "$$@"
480 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$<
481endef
482$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
483, $(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),$(file))))
484
485
486# Generates the VBoxManage command overview include file (shared between
487# languages) from the refsynopsisdiv section of the man pages.
488$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)): \
489 $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \
490 $$(patsubst overview_%,$$(VBOX_PATH_MANUAL_SRC)/en_US/%,$$(notdir $$@)) \
491 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
492 | $$(dir $$@)
493 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
494 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" $< $(filter %.xml,$^)
495
496$(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml: $(VBOXMANAGEHELP_PATH) $(MAKEFILE_CURRENT) | $$(dir $$@)
497 $(call MSG_GENERATE,,$@,)
498 $(QUIET)$(RM) -f $@ [email protected]
499 $(QUIET)$(APPEND) -tn "$@" \
500 '<?xml version="1.0" encoding="UTF-8"?>' \
501 '<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">' \
502 '<sect1> <!-- this will be skipped via xpointer in the include. --> '
503 $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
504 $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
505 -- \
506 $(VBOXMANAGEHELP_PATH) --dumpopts
507 $(QUIET)$(SED) \
508 -e ':a' \
509 -e 'N' \
510 -e '$(DOLLAR)!ba' \
511 -e 's/</\&lt\;/g' \
512 -e 's/>/\&gt\;/g' \
513 -e 's/\n*$(DOLLAR)/<\/screen>/' \
514 -e 's/^/<screen>/' \
515 --append $@ [email protected]
516 $(QUIET)$(RM) -f [email protected]
517 $(QUIET)$(APPEND) -n "$@" \
518 ' <remark role="VBoxManage-overview">' \
519 $(foreach refentry, $(filter man_VBoxManage%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
520 , ' <xi:include href="overview_$(refentry)" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />') \
521 ' </remark>' \
522 '</sect1>'
523
524
525
526
527##########################################################################################
528#
529# Shared rules for PDF generation
530#
531##########################################################################################
532
533ifndef VBOX_OSE
534# copy ucs.sty and related files
535$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/ucs.sty):
536 $(call MSG_L1,Copying unicode support for LaTeX)
537 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_MANUAL_TEX_UNICODE_FILES) "$(@D)"
538endif
539
540# copy the PNG files.
541# Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
542define def_vbox_cp_images_pdf
543local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
544$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
545 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
546 $$(call MSG_L1,Copying temporary $$< => $$@)
547 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
548endef
549
550$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_cp_images_pdf))
551
552
553##########################################################################################
554#
555# UserManual.pdf
556#
557##########################################################################################
558
559$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf): \
560 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf : \
561 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex \
562 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/%/ucs.sty) \
563 $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
564 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) | $$(dir $$@)
565# PDF generation via Latex: generate the .tex file
566 $(call MSG_L1,pdflatex $< (four passes) -> $@)
567 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
568 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
569 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
570 $(QUIET)$(REDIRECT) -w+ti /dev/null -C $(@D) -- $(VBOX_PDFLATEX_CMD) UserManual.tex
571 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
572 $(QUIET)$(SED) -n \
573 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
574 $(basename $@).log
575 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
576
577# generate temporary LaTeX source from processed XML
578$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.tex): \
579 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex : \
580 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.xml \
581 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
582 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
583 $(if $(and $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_DOCBOOK_DTD)),$(VBOX_PATH_MANUAL_OUTBASE)/%/validatemanual.run,) \
584 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE_CURRENT)
585 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
586 $(QUIET)$(RM) -f $(addprefix $(@D)/,$(VBOX_MANUAL_LATEX_FILES_TARGET))
587# generate TeX source from processed docbook and store it in UserManual.tex.tmp;
588# pass current language to xsltproc in TARGETLANG variable (extract it from the
589# current directory, should become "de_DE" or the like)
590 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG $(notdir $(@D)) \
591 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
592# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
593# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
594 $(QUIET)$(SED) \
595 -e 's|^\\QUOTE{}|\\OQ{}|g' \
596 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
597 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
598 --output $@ [email protected]
599 $(QUIET)$(RM) -f [email protected]
600
601# Useful aliases
602usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf
603
604debug-usermanual:
605 $(MAKE) --pretty-command-printing -j1 VBOX_PDFLATEX_INTERACTION=errorstopmode $(PATH_STAGE_BIN)/UserManual.pdf
606
607#
608# Generate rules for validating the UserManual.xml. These are invoked
609# automatically at build time, but can also be manually invoked via the
610# 'validatemanual' and 'validatemanual_<lang>' aliases.
611#
612define def_vbox_validate_xml
613validatemanual_$(lang):: $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run
614$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run: \
615 $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/UserManual.xml \
616 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
617 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
618 $$(call MSG_L1,Validating $$<)
619 $$(QUIET)$$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$<
620 $$(QUIET)$$(APPEND) -t "$$@" "done"
621endef
622$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_validate_xml))
623validatemanual:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),validatemanual_$(lang))
624
625
626
627#
628# SDKRef.pdf
629#
630
631# Replace <tt> tags in VirtualBox.xidl.
632$(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
633 $(call MSG_L1,Generating $@)
634 $(QUIET)$(SED) -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
635 -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
636 --output $@ $<
637
638# Generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
639$(VBOX_MANUAL_APIREF_TMP): $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
640 $(call MSG_L1,Generating $@)
641 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_XSLTPROC_OPTS) --xinclude --nonet -o $@ $< $(VBOX_DOC_XIDL_SRC_TMP)
642
643$(evalcall2 def_vbox_replace_stuff_in_xml,/en_US/SDKRef.xml,/en_US)
644$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.xml: $(VBOX_MANUAL_APIREF_TMP)
645
646# Turn SDKRef.xml into latex.
647$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: \
648 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
649 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
650 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE_CURRENT) | $$(dir $$@)
651 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
652 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
653## check it for validity first.
654#ifdef VBOX_HAVE_XMLLINT
655# $(QUIET)$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $<
656#endif
657# generate TeX source from processed docbook and store it in SDKRef.tex.tmp
658 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG en_US \
659 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
660# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
661# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
662 $(QUIET)$(SED) \
663 -e 's|^\\QUOTE{}|\\OQ{}|g' \
664 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
665 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
666 --output $@ [email protected]
667 $(QUIET)$(RM) -f [email protected]
668
669# Turn SDKRef.tex into a PDF.
670$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf: \
671 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
672 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
673 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
674 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/docs
675 $(call MSG_L1,pdflatex $< (three passes))
676 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
677 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
678 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
679 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
680 $(QUIET)$(SED) -n \
681 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
682 $(basename $<).log
683 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
684
685
686# Handy aliases.
687validate-sdkref:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.xml
688sdkref:: $(VBOX_PATH_SDK)/docs/SDKRef.pdf
689
690
691ifdef VBOX_WITH_DOCS_CHM
692 #
693 # VirtualBox.chm
694 #
695 # We first generate a .hhp help source file from the preprocessed
696 # DocBook XML files, as defined above, then feed that into the
697 # Microsoft Help Compiler.
698 #
699 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-htmlhelp-formatcfg.xsl,/$(lang)))
700
701 # Manual formatcfg dependencies for the above.
702 $(foreach lang,$(VBOX_MANUAL_LANGUAGES), $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/docbook-htmlhelp-formatcfg.xsl): \
703 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
704 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
705
706 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm): \
707 $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm: \
708 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp \
709 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f))))
710 $(call MSG_L1,hhc $<,=> $@)
711 $(QUIET)$(RM) -f $@
712 $(QUIET)$(VBOX_HHC) $(subst /,\\,$<)
713 $(call MSG_L1,Fresh CHM is now at $@)
714
715 # Prepare the XSL file for our title page, htmlhelp variant.
716 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/titlepage-htmlhelp.xsl): \
717 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
718 $(call MSG_L1,xsltproc $<)
719 $(QUIET)$(RM) -f [email protected] $@
720 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
721 $(QUIET)$(MV) -f [email protected] $@
722
723 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/htmlhelp.hhp): \
724 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp: \
725 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.xml \
726 $(VBOX_PATH_MANUAL_OUTBASE)/%/docbook-htmlhelp-formatcfg.xsl \
727 $(VBOX_PATH_MANUAL_OUTBASE)/%/titlepage-htmlhelp.xsl \
728 $(VBOX_PATH_MANUAL_OUTBASE)/%/validatemanual.run \
729 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
730 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK)
731 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
732 $(QUIET)$(RM) -f $@
733 $(QUIET)$(MKDIR) -p $(@D)
734 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output $(@D)/ \
735 --stringparam htmlhelp.chm \
736 $(subst /,\\,$(@D)/../VirtualBox.chm) \
737 $(HTMLHELPOPTS) $(@D)/../docbook-htmlhelp-formatcfg.xsl \
738 $<
739
740 # copy the PNG files.
741 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
742 define def_vbox_cp_images_html
743 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/HTMLHelp
744 $$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
745 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
746 $$(call MSG_L1,Copying temporary $$< => $$@)
747 $$(QUIET)$$(CP) -f $$< $$@
748 endef
749
750 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_html)))
751
752 # Packing the docs into a zip file
753 $(PATH_STAGE_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
754 $(call MSG_L1,Packing documentation $@)
755 $(QUIET)$(RM) -f $@
756 $(QUIET)$(REDIRECT) -C $(PATH_STAGE_BIN) -- $(VBOX_ZIP) -9 $@ $(notdir $^)
757
758endif # VBOX_WITH_DOCS_CHM
759
760
761##########################################################################################
762#
763# UserManual.html
764#
765##########################################################################################
766$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-one-page-formatcfg.xsl,/en_US)
767$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-chunks-formatcfg.xsl,/en_US)
768
769# Manual formatcfg dependencies.
770$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
771$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl: \
772 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
773 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
774
775$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
776 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
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 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
780 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
781 | $$(dir $$@)
782 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
783 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
784 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
785 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
786 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
787
788$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
789 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
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 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
793 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
794 | $$(dir $$@)
795 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
796 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
797 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
798 --stringparam chunk.section.depth 0 \
799 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
800 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
801
802$(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
803 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
804 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
805 $(call MSG_L1,Packing documentation $@)
806 $(QUIET)$(RM) -f $@
807 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- $(VBOX_ZIP) \
808 -9 -r $@ html-single html-chunks $(VBOX_MANUAL_PNG_FILES_en_US)
809
810html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
811html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
812html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
813
814
815#
816# ChangeLog.html
817#
818# This XSLT rule depends on $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml, which is build by the complex rule
819# $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_ChangeLog.xml): ...
820# much further above. That rule takes en_US/user_ChangeLog.xml and replaces $VIRTUALBOX_CHANGELOG_IMPL
821# with the actual change log contained in user_ChangeLogImpl.xml
822#
823$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-changelog-formatcfg.xsl,/en_US)
824$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
825 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl \
826 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml \
827 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) | $$(dir $$@)
828 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
829 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" "$<" $(filter %.xml,$^)
830 $(call MSG_L1,Fresh ChangeLog.html is now at $@)
831
832cl-html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
833
834
835
836endif # if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
837
838
839#
840# VBoxManage man pages (parts also required by VBoxManage build-in help).
841#
842$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-manpage.xsl,)
843
844##
845# Emits rules for preprocessing refentry sources (applying remarks element),
846# and for producing the actual man pages.
847# $(evalcall2 def_vbox_refentry_to_manpage)
848# @param 1 The language
849# @param 2 The file name (no path).
850define def_vbox_refentry_to_manpage
851$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2): \
852 $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
853 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl \
854 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) \
855 $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
856 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
857 $$(QUIET)$$(RM) -f "$$@"
858 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ \
859 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl $$<
860if defined(VBOX_HAVE_XMLLINT) && "$(USER)" == "bird" # Effing stuff happends on build servers, probably kmk related...
861 $$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$@
862endif
863
864$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(patsubst man_%,%.1,$(basename $(2))): \
865 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2) \
866 $$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-manpage.xsl \
867 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) \
868 $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
869 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
870 $$(QUIET)$$(RM) -f "$$@"
871 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-manpage.xsl $$<
872endef
873$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
874, $(evalcall2 def_vbox_refentry_to_manpage,$(lang),$(file))))
875
876
877# Handy aliases.
878validate-manpages:: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_REFENTRY_FILES))
879man-experiment:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
880 ,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/$(patsubst man_%,%.1,$(basename $(file)))))
881
882
883#
884# VBoxManage built-in help.
885#
886# Note! Generating the stuff here is a bit annoying, but currently the most
887# practical way I can come up with.
888#
889OTHERS += \
890 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
891 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h
892OTHER_CLEAN += \
893 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
894 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp.ts \
895 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h \
896 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h.ts
897help-experiment:: \
898 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
899 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h
900
901$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-C-help.xsl,)
902$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-H-help.xsl,)
903
904$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl: $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl # manual dependency.
905
906$(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp.ts \
907+| $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp: \
908 $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl \
909 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
910 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
911 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
912 $(QUIET)$(APPEND) -tn "$@" \
913 '/* Autogenerated by $<, do not edit! */' \
914 '' \
915 '#include <iprt/types.h>' \
916 '#include "VBoxManageBuiltInHelp.h"' \
917 ''
918 $(foreach refentry,$(filter %.xml,$^) \
919 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") $< $(refentry))
920 $(QUIET)$(APPEND) -n "$@" \
921 '' \
922 'PCREFENTRY g_apHelpEntries[] = ' \
923 '{'
924 $(foreach refentry,$(filter %.xml,$^) \
925 ,$(NLTAB)$(QUIET)$(APPEND) -n "$@" \
926 ' &g_$(subst -,_,$(tolower $(patsubst man_%,%,$(notdir $(basename $(refentry)))))), ')
927 $(QUIET)$(APPEND) -n "$@" \
928 '};' \
929 'const uint32_t g_cHelpEntries = RT_ELEMENTS(g_apHelpEntries);' \
930 ''
931 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
932# The above APPEND stuff trigger some kind of problem on some boxes when not split up...
933# update: Fixed in SVN (strcpy -> memmove in new_job(), job.c - r2591). Just need to rebuild all platforms.
934
935$(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h.ts \
936+| $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h: \
937 $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-H-help.xsl \
938 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
939 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
940 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
941 $(QUIET)$(APPEND) -tn "$@" \
942 '/* Autogenerated by $<, do not edit! */' \
943 '' \
944 '#ifndef ___VBoxManageBuiltInHelp_h___' \
945 '#define ___VBoxManageBuiltInHelp_h___' \
946 '' \
947 '#include <VBox/refentry.h>' \
948 '' \
949 'RT_C_DECLS_BEGIN' \
950 '' \
951 'typedef enum HELP_CMD_VBOXMANAGE' \
952 '{' \
953 ' HELP_CMD_VBOXMANAGE_INVALID = 0,'
954 $(foreach refentry,$(filter %.xml,$^) \
955 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
956 --stringparam 'g_sMode' 'cmd' $< $(refentry))
957 $(QUIET)$(APPEND) -n "$@" \
958 ' HELP_CMD_VBOXMANAGE_END' \
959 '} HELP_CMD_VBOXMANAGE;'
960 $(foreach refentry,$(filter %.xml,$^) \
961 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
962 --stringparam 'g_sMode' 'subcmd' $< $(refentry))
963 $(QUIET)$(APPEND) -n "$@" \
964 '' \
965 'extern PCREFENTRY g_apHelpEntries[];' \
966 'extern const uint32_t g_cHelpEntries;' \
967 '' \
968 'RT_C_DECLS_END' \
969 '' \
970 '#endif' \
971 ''
972 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
973
974
975include $(FILE_KBUILD_SUB_FOOTER)
976
Note: See TracBrowser for help on using the repository browser.

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