VirtualBox

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

Last change on this file since 99075 was 99075, checked in by vboxsync, 21 months ago

manual/Makefile.kmk: Nuke the output directories prior to running DITA-OT when possible, also make sure they exists to prevent trouble with newer DITA-OT plugins. bugref:10302

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 47.3 KB
Line 
1# $Id: Makefile.kmk 99075 2023-03-20 23:52:00Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox User Manual, SDK reference and other manuals.
4#
5
6#
7# Copyright (C) 2006-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28#
29# This slightly messy makefile transforms the DocBook XML source for the
30# user manual into presentation output. We support two targets:
31#
32# -- UserManual.pdf, generated by LaTex
33#
34#
35# Both files end up in PATH_STAGE_BIN.
36#
37# Both targets indirectly depend on the XML files in this directory;
38# "indirectly" because we first copy them to PATH_TARGET and hack them
39# up a bit for variable substitution and such (see below).
40# The toolchains are roughly like this:
41#
42# -- PDF file via Apache FOP: pre-process the XML files in PATH_TARGET,
43# then create a .FO file (another XML format for "formatted objects")
44# via xsltproc, then feed the .FO file to Apache FOP to create the PDF.
45#
46# -- PDF file via LaTeX: pre-process the XML files in PATH_TARGET, then
47# run our custom "dblatex" perl script on UserManual.xml, which parses
48# the XML (using the Perl SAX parsers) and dumps a matching LaTeX file
49# to UserManual.tex. This is then regularly processed by pdflatex to
50# generate PDF.
51#
52#
53
54SUB_DEPTH = ../..
55include $(KBUILD_PATH)/subheader.kmk
56
57ifndef VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED
58 include $(PATH_SUB_CURRENT)/Config.kmk
59endif
60
61if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK)) # Whole file.
62
63 #
64 # Globals
65 #
66
67 ## Combines the VBOX_MANUAL_LANGUAGES and VBOX_MANUAL_ADD_LANGUAGES lists from
68 # /Config.kmk, as per the VBOX_WITH_DOCS_TRANSLATIONS setting.
69 ifdef VBOX_WITH_DOCS_TRANSLATIONS
70 VBOX_MANUAL_ALL_LANGUAGES := $(VBOX_MANUAL_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)
71 else
72 VBOX_MANUAL_ALL_LANGUAGES := $(VBOX_MANUAL_LANGUAGES)
73 endif
74
75 ## The files that should go into VBoxDocumentation.zip (must be immediately under PATH_STAGE_BIN).
76 VBOX_MANUAL_PACK =
77
78 # Various file lists (mainly needed for OTHER_CLEAN).
79 VBOX_QHELP_OUTPUT_FILES := UserManual.qch UserManual.qhc
80 VBOX_ACCESSIBILITY_XML_FILES := Accessibility.xml
81 VBOX_MANUAL_LATEX_FILES_TARGET := $(addprefix UserManual.,aux log out toc tex)
82 VBOX_SDKREF_LATEX_FILES_TARGET := $(addprefix SDKRef.,aux log out toc tex)
83 VBOX_ACCESSIBILITY_LATEX_FILES_TARGET := $(addprefix Accessibility.,aux log out toc tex)
84
85 VBOX_MANUAL_TEX_UNICODE_FILES = $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
86
87 # Wildcard the images path for every supported language
88 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES) \
89 ,$(eval VBOX_MANUAL_PNG_FILES_$$(lang) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(lang)/%,%, \
90 $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(lang)/images/*.png))))
91
92 # XML
93 $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES), \
94 $(eval VBOX_MANUAL_XML_FILES_GENERATED_$$(lang) := \
95 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
96 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
97 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_man_VBoxHeadless.xml \
98 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_man_vboximg-mount.xml \
99 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_isomakercmd-man.xml))
100
101 # SDK related globals.
102 VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
103 VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
104 VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
105
106
107 #
108 # PDF LaTeX related globals.
109 #
110
111 VBOX_PDFLATEX_INTERACTION ?= batchmode
112 # VBOX_PDFLATEX_INTERACTION = errorstopmode - Use this when you wants to figure out build failures
113 # without catting the log a million times.
114 ifeq ($(KBUILD_HOST),win)
115 ifndef VBOX_PDFLATEX
116 VBOX_PDFLATEX := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS)/win.x86/miktex-portable/*/miktex/bin/pdflatex.exe)))
117 ifneq ($(VBOX_PDFLATEX),)
118 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION)
119 endif
120 endif
121 ifndef VBOX_PDFLATEX
122 # Tell MiKTeX to automatically download packages if system wide install.
123 VBOX_PDFLATEX := pdflatex
124 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION) --enable-installer
125 endif
126 else
127 VBOX_PDFLATEX ?= pdflatex
128 VBOX_PDFLATEX_HALT = $(shell ( $(VBOX_PDFLATEX) -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
129 VBOX_PDFLATEX_CMD = pdflatex $(VBOX_PDFLATEX_HALT) -interaction $(VBOX_PDFLATEX_INTERACTION)
130 endif
131
132
133 #
134 # DITA-OT related globals.
135 #
136
137 ##
138 # Copies DITA-OT to $1, runs the dost.jar with /ditadir given and nukes $1 when done.
139 #
140 # Additional options for dost.jar can be specified following the call to VBOX_DITA_RUN_DOST
141 #
142 # @param 1 Temporary+unique DITA-OT path.
143 # @param 2 Additional kmk_redirect options.
144 # @param 3 Parameters for the invoker.
145 # @param 4 Parameters only for 1.8.5.
146 # @param 5 Parameters only for 4.0.2.
147 #
148 VBOX_DITA_RUN_DOST ?= $(REDIRECT) \
149 -E 'ANT_OPTS=-Xmx512m -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl' \
150 -E 'ANT_HOME=$1/tools/ant' \
151 -E 'DITA_DIR=$1' \
152 -E 'JAVA_HOME=$(VBOX_JAVA_HOME)' \
153 -A 'PATH=$(HOST_PATH_SEP)$1/tools/ant/bin' \
154 -E 'CLASSPATH=$1/lib/dost.jar' \
155 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib' \
156 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/commons-codec-1.4.jar' \
157 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/resolver.jar' \
158 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/icu4j.jar' \
159 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/xercesImpl.jar' \
160 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/xml-apis.jar' \
161 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/saxon/saxon9.jar' \
162 -A 'CLASSPATH=$(HOST_PATH_SEP)$1/lib/saxon/saxon9-dom.jar' \
163 $2 \
164 -- $(ASH) $(VBOX_PATH_MANUAL_SRC)/dita-ot-copy-exec.sh "$(VBOX_DITA_ORIGINAL_PATH)" "$1" \
165 -- $(VBOX_JAVA) -jar "$1/lib/dost.jar" "/ditadir:$1" $3 $4 # "/outercontrol:fail" ?
166
167 if 0 # Experiments with dita-ot v4.0.2. Requires java 17.
168 VBOX_JAVA_HOME := C:/Program Files/Java/jdk-17/
169 VBOX_DITA_ORIGINAL_PATH := D:/Tmp/dita/dita-ot-4.0.2
170 VBOX_DITA_CLASSPATH = \
171 $(subst $(SP),;,$(strip \
172 $(VBOX_DITA_ORIGINAL_PATH)/lib/ant-launcher.jar \
173 $(VBOX_DITA_ORIGINAL_PATH)/config \
174 $(VBOX_DITA_ORIGINAL_PATH)/lib \
175 $(wildcard \
176 $(VBOX_DITA_ORIGINAL_PATH)/lib/*.jar \
177 $(VBOX_DITA_ORIGINAL_PATH)/plugins/*/lib/*.jar)))
178 VBOX_DITA_RUN_DOST = $(REDIRECT) \
179 -E 'ANT_HOME=$(VBOX_DITA_ORIGINAL_PATH)' \
180 -E 'DITA_DIR=$(VBOX_DITA_ORIGINAL_PATH)' \
181 -E 'JAVA_HOME=$(VBOX_JAVA_HOME)' \
182 -E 'CLASSPATH=$(VBOX_DITA_CLASSPATH)' \
183 $2 \
184 -- \
185 $(VBOX_JAVA) \
186 "-Djava.awt.headless=true" \
187 "-Dsun.io.useCanonCaches=true" \
188 "-Dant.home=$(VBOX_DITA_ORIGINAL_PATH)" \
189 "-Ddita.dir=$(VBOX_DITA_ORIGINAL_PATH)" \
190 org.apache.tools.ant.launch.Launcher \
191 -cp "$(VBOX_DITA_CLASSPATH)" \
192 -buildfile "$(VBOX_DITA_ORIGINAL_PATH)/build.xml" \
193 -main "org.dita.dost.invoker.Main" \
194 $(patsubst "/i:%,"--input=%, \
195 $(patsubst "/transtype:%,"--format=%, \
196 $(patsubst "/outdir:%,"--output=%, \
197 $(patsubst "/tempdir:%,"--temp=%, \
198 $(patsubst "/debug","--debug",$3))))) \
199 $5 --verbose --debug
200 endif
201
202
203 #
204 # Targets
205 #
206
207 BLDDIRS += $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, $(VBOX_MANUAL_ALL_LANGUAGES))
208
209 ifdef VBOX_ONLY_DOCS
210 PACKING += $(PATH_STAGE_BIN)/VBoxDocumentation.zip
211 endif
212
213 BLDDIRS += \
214 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita \
215 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/topics \
216 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/topics/images
217
218 BLDDIRS += \
219 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, \
220 $(addsuffix /images, $(VBOX_MANUAL_ALL_LANGUAGES)) \
221 $(addsuffix /html-single, $(VBOX_MANUAL_ALL_LANGUAGES)) \
222 $(addsuffix /html-chunks, $(VBOX_MANUAL_ALL_LANGUAGES)) \
223 $(addsuffix /qhelp, $(VBOX_MANUAL_ALL_LANGUAGES)) \
224 $(addsuffix /qhelp/images, $(VBOX_MANUAL_ALL_LANGUAGES)) \
225 $(addsuffix /HTMLHelp, $(VBOX_MANUAL_ALL_LANGUAGES)) \
226 $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_ALL_LANGUAGES)) \
227 )
228
229 # Explicit cleaning has some overlap with default cleaning rules, since this
230 # Makefile is using very complex conditionals for selectively creating
231 # specific files, and not everyone remembers to use the same with "kmk clean".
232 OTHER_CLEAN += \
233 $(VBOX_XML_CATALOG) \
234 $(VBOX_XML_CATALOG_DOCBOOK) \
235 $(VBOX_XML_CATALOG_MANUAL) \
236 $(VBOX_XML_ENTITIES) \
237 $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES) \
238 ,$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
239 $(VBOX_XML_XREF_TO_TEXT) \
240 $(VBOX_XML_XREF_TO_TEXT).cat \
241 $(addprefix user_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
242 $(VBOX_MANUAL_XML_REFENTRY_FILES) \
243 $(patsubst man_%,%.1,$(basename $(VBOX_MANUAL_XML_REFENTRY_FILES))) \
244 man_VBoxHeadless.xml \
245 user_man_VBoxHeadless.xml \
246 man_vboximg-mount.xml \
247 user_man_vboximg-mount.xml \
248 isomakercmd-man.xml \
249 user_isomakercmd-man.xml \
250 $(VBOX_MANUAL_LATEX_FILES_TARGET) \
251 $(VBOX_MANUAL_PNG_FILES_$(lang)) \
252 $(notdir $(VBOX_MANUAL_TEX_UNICODE_FILES)) \
253 $(addprefix HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(lang))) \
254 $(addprefix qhelp/, $(VBOX_MANUAL_PNG_FILES_$(lang))) \
255 html-single/UserManual.html \
256 $(addprefix qhelp/, UserManual.qhp UserManual.qhcp $(VBOX_QHELP_OUTPUT_FILES)) \
257 $(addprefix HTMLHelp/, index.html go01.html) \
258 $(addprefix qhelp/, index.html go01.html) \
259 $(addprefix html-chunks/, index.html go01.html) \
260 $(foreach n,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 \
261 ,html-chunks/ch$(n).html \
262 html-chunks/re$(n).html \
263 HTMLHelp/ch$(n).html \
264 HTMLHelp/re$(n).html \
265 $(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)) \
266 qhelp/ch$(n).html \
267 qhelp/re$(n).html \
268 $(foreach d2,0 1 2 3 4 5 6 7 8 9,$(foreach d1,0 1 2 3 4 5 6 7 8 9,qhelp/ch$(n)s$(d2)$(d1).html)) ) \
269 $(foreach n,a b c \
270 ,html-chunks/ap$(n).html \
271 HTMLHelp/ap$(n).html \
272 $(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) \
273 qhelp/ap$(n).html \
274 $(foreach s,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20,qhelp/ap$(n)s$(s).html) ) \
275 $(foreach n,01 02 03 04 05 \
276 ,html-chunks/pr$(n).html \
277 HTMLHelp/pr$(n).html \
278 $(foreach s,01 02 03 04 05 06 07 08,HTMLHelp/pr$(n)s$(s).html) \
279 qhelp/pr$(n).html \
280 $(foreach s,01 02 03 04 05 06 07 08,qhelp/pr$(n)s$(s).html) ) \
281 HTMLHelp/toc.hhc \
282 HTMLHelp/htmlhelp.hhp \
283 qhelp/toc.hhc \
284 qhelp/htmlhelp.hhp \
285 UserManual.pdf \
286 VirtualBox.chm \
287 $(VBOX_QHELP_OUTPUT_FILES) \
288 ChangeLog.html \
289 validatemanual.run \
290 validateaccessibility.run \
291 validatesdkref.run \
292 ) \
293 ) \
294 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl \
295 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
296 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf) \
297 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm) \
298 $(PATH_STAGE_BIN)/UserManual.pdf \
299 $(PATH_STAGE_BIN)/VirtualBox.chm \
300 \
301 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
302 $(VBOX_SDKREF_LATEX_FILES_TARGET) \
303 SDKRef.pdf \
304 ) \
305 $(PATH_STAGE_BIN)/sdk/docs/SDKRef.pdf \
306 \
307 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
308 $(VBOX_ACCESSIBILITY_LATEX_FILES_TARGET) \
309 html-single/Accessibility.html \
310 Accessibility.pdf \
311 ) \
312 $(PATH_STAGE_BIN)/Accessibility.html \
313 $(PATH_STAGE_BIN)/Accessibility.pdf \
314 \
315 $(VBOX_DOC_XIDL_SRC_TMP) \
316 $(VBOX_MANUAL_APIREF_TMP)
317
318
319 ifndef VBOX_ONLY_SDK
320 #
321 # target for installing UserManual.pdf
322 #
323 INSTALLS += VBox-docs-usermanual
324 VBox-docs-usermanual_INST = $(INST_BIN)
325 VBox-docs-usermanual_MODE = a+r,u+w
326 VBox-docs-usermanual_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf
327 VBOX_MANUAL_PACK += $(PATH_STAGE_BIN)/UserManual.pdf
328
329 ifdef VBOX_WITH_DOCS_TRANSLATIONS
330 #
331 # target for installing translated UserManual_*.pdf
332 #
333 INSTALLS += VBox-docs-usermanual-l10n
334 VBox-docs-usermanual-l10n_INST = $(INST_BIN)
335 VBox-docs-usermanual-l10n_MODE = a+r,u+w
336 VBox-docs-usermanual-l10n_SOURCES = \
337 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/UserManual.pdf=>UserManual_$(f).pdf)
338 VBOX_MANUAL_PACK += $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf)
339 endif
340
341 ifdef VBOX_WITH_DOCS_HTML
342 #
343 # target for installing the chunked HTML docs
344 #
345 INSTALLS += VBox-docs-usermanual-html
346 VBox-docs-usermanual-html_INST = $(INST_BIN)
347 VBox-docs-usermanual-html_MODE = a+r,u+w
348 VBox-docs-usermanual-html_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip=>UserManual-html.zip
349 VBOX_MANUAL_PACK += $(PATH_STAGE_BIN)/UserManual-html.zip
350 endif
351
352 ifdef VBOX_WITH_DOCS_QHELP
353 #
354 # Installs the qhelp version of the manual.
355 #
356 INSTALLS += VBox-docs-usermanual-qhelp
357 VBox-docs-usermanual-qhelp_INST = $(INST_BIN)
358 VBox-docs-usermanual-qhelp_MODE = a+r,u+w
359 VBox-docs-usermanual-qhelp_SOURCES = \
360 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhc \
361 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qch
362 ifdef VBOX_WITH_DOCS_QHELP_PACKING
363 VBOX_MANUAL_PACK += \
364 $(PATH_STAGE_BIN)/UserManual.qch \
365 $(PATH_STAGE_BIN)/UserManual.qhc
366 endif
367 endif
368
369 ifdef VBOX_WITH_DOCS_ACCESSIBILITY
370 #
371 # target for installing Accessibility.pdf
372 #
373 INSTALLS += VBox-docs-accessibility
374 VBox-docs-accessibility_INST = $(INST_BIN)
375 VBox-docs-accessibility_MODE = a+r,u+w
376 VBox-docs-accessibility_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.pdf
377
378 #
379 # target for installing Accessibility.html
380 #
381 INSTALLS += VBox-docs-accessibility-html
382 VBox-docs-accessibility-html_INST = $(INST_BIN)
383 VBox-docs-accessibility-html_MODE = a+r,u+w
384 VBox-docs-accessibility-html_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html
385 endif
386
387 endif # !VBOX_ONLY_SDK
388
389 if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
390 #
391 # target for installing SDKRef.pdf
392 #
393 INSTALLS += VBox-docs-sdkref
394 VBox-docs-sdkref_INST = $(INST_SDK)docs/
395 VBox-docs-sdkref_MODE = a+r,u+w
396 VBox-docs-sdkref_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf
397 endif
398
399
400 ##
401 # Morph man pages into Docbook manual sections.
402 # $(evalcall2 def_vbox_refentry_to_user_sect1)
403 #
404 # @param 1 Language.
405 # @param 2 the refentry xml base file name.
406 # @param 3 the full refentry xml file path.
407 ## @todo r=bird: This is still Docbook, so unused now?
408 define def_vbox_refentry_to_user_sect1
409 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): $(3) \
410 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
411 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
412 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
413 $$(call MSG_TOOL,xsltproc docbook-refentry-to-manual-sect1.xsl,,$3,$$@)
414 $$(QUIET)$$(RM) -f -- "$$@"
415 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$<
416 endef
417 $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES) \
418 ,$(foreach file, $(VBOX_MANUAL_XML_REFENTRY_FILES) man_VBoxHeadless.xml man_vboximg-mount.xml \
419 , $(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),$(file),$(VBOX_PATH_MANUAL_SRC)/$(lang)/$(file))))
420 $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES) \
421 ,$(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),isomakercmd-man.xml,$(PATH_ROOT)/src/VBox/Runtime/common/fs/isomakercmd-man.xml))
422
423
424 # Generates the VBoxManage command overview include file (shared between
425 # languages) from the refsynopsisdiv section of the man pages.
426 ## @todo r=bird: This is still Docbook, so unused now?
427 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)): \
428 $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \
429 $$(patsubst overview_%,$$(VBOX_PATH_MANUAL_SRC)/en_US/%,$$(notdir $$@)) \
430 $(VBOX_XML_CATALOG) \
431 $(VBOX_XML_CATALOG_DOCBOOK) \
432 $(VBOX_XML_CATALOG_MANUAL) \
433 $(VBOX_XML_ENTITIES) | $$(dir $$@)
434 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
435 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" $< $(filter %.xml,$^)
436
437
438
439 #
440 # Shared rules for LaTeX based PDF generation - Only used for SDK & Accessibility.
441 #
442
443 ifndef VBOX_OSE
444 # Copy ucs.sty and associated files.
445 ## @todo r=bird: This is ugly since only ucs.sty is listed as output while we're actually copying 177 other files.
446 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/ucs.sty): | $$(dir $$@)
447 $(call MSG_L1,Copying unicode support for LaTeX)
448 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_MANUAL_TEX_UNICODE_FILES) "$(@D)"
449 endif
450
451 # Copy the PNG files.
452 define def_vbox_cp_images_pdf
453 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
454 $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/% : \
455 $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
456 $$(call MSG_L1,Copying temporary $$< => $$@)
457 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
458 endef
459 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES),$(evalcall2 def_vbox_cp_images_pdf))
460
461
462 #################################################################################################################################
463 # SDKRef.pdf - xidl => Docbook => LaTeX => PDF #
464 #################################################################################################################################
465
466 VBOX_SDKREF_XML_FILES = SDKRef.xml
467
468 # Replace @a and @c with <tt> tags in VirtualBox.xidl.
469 $(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
470 $(call MSG_L1,Generating $@)
471 $(QUIET)$(SED) \
472 -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
473 -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
474 --output $@ $<
475
476 # Generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
477 $(VBOX_MANUAL_APIREF_TMP): $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
478 $(call MSG_L1,Generating $@)
479 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_XSLTPROC_OPTS) --xinclude --nonet -o $@ $< $(VBOX_DOC_XIDL_SRC_TMP)
480
481 # Turn SDKRef.xml into LaTeX.
482 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: \
483 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
484 $(VBOX_MANUAL_APIREF_TMP) \
485 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
486 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run,) \
487 $(VBOX_XML_CATALOG) \
488 $(VBOX_XML_CATALOG_DOCBOOK) \
489 $(VBOX_XML_CATALOG_MANUAL) \
490 $(VBOX_XML_ENTITIES) \
491 $(MAKEFILE_CURRENT) \
492 | $$(dir $$@)
493 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
494 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
495 # generate TeX source from processed docbook and store it in SDKRef.tex.tmp
496 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG en_US \
497 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
498 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
499 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
500 $(QUIET)$(SED) \
501 -e 's|^\\QUOTE{}|\\OQ{}|g' \
502 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
503 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
504 --output $@ [email protected]
505 $(QUIET)$(RM) -f [email protected]
506
507 # Turn SDKRef.tex into a PDF.
508 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf: \
509 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
510 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
511 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
512 | $$(dir $$@)
513 $(call MSG_L1,pdflatex $< (three passes))
514 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
515 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
516 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
517 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
518 $(QUIET)$(SED) -n \
519 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
520 $(basename $<).log
521 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
522
523 # Validating SDKRef.xml. It is invoked automatically at build time,
524 # but can also be manually invoked via the 'validate-sdkref' alias.
525 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run: \
526 $(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef.xml \
527 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
528 $(VBOX_MANUAL_APIREF_TMP) \
529 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
530 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
531 $(call MSG_L1,Validating $<)
532 $(QUIET)$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $<
533 $(QUIET)$(APPEND) -t "$@" "done"
534
535
536 # Handy aliases.
537 validate-sdkref:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run
538 sdkref:: $(PATH_STAGE_BIN)/sdk/docs/SDKRef.pdf
539
540
541 #################################################################################################################################
542 # Accessibility.pdf - Docbook => LaTeX => PDF #
543 #################################################################################################################################
544
545 # Turn Accessibility.xml into LaTeX.
546 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.tex: \
547 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
548 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
549 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run,) \
550 $(VBOX_XML_CATALOG) \
551 $(VBOX_XML_CATALOG_DOCBOOK) \
552 $(VBOX_XML_CATALOG_MANUAL) \
553 $(VBOX_XML_ENTITIES) \
554 $(MAKEFILE_CURRENT) \
555 | $$(dir $$@)
556 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
557 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_ACCESSIBILITY_LATEX_FILES_TARGET))
558 # generate TeX source from processed docbook and store it in Accessibility.tex.tmp
559 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG en_US \
560 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
561 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
562 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
563 $(QUIET)$(SED) \
564 -e 's|^\\QUOTE{}|\\OQ{}|g' \
565 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
566 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
567 --output $@ [email protected]
568 $(QUIET)$(RM) -f [email protected]
569
570 # Turn Accessibility.tex into a PDF.
571 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.pdf: \
572 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.tex \
573 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
574 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US))
575 $(call MSG_L1,pdflatex $< (three passes))
576 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
577 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
578 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
579 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
580 $(QUIET)$(SED) -n \
581 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
582 $(basename $<).log
583 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
584
585 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html: \
586 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
587 $(VBOX_DOCBOOK_HTML_ONE_PAGE_FORMATCFG) \
588 $(VBOX_XML_CATALOG) \
589 $(VBOX_XML_CATALOG_DOCBOOK) \
590 $(VBOX_XML_CATALOG_MANUAL) \
591 $(VBOX_XML_ENTITIES) | $$(dir $$@)
592 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
593 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
594 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html \
595 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl \
596 $<
597
598 # Validating Accessibility.xml. It is invoked automatically at build time,
599 # but can also be manually invoked via the 'validate-accessibility' alias.
600 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run: \
601 $(VBOX_PATH_MANUAL_SRC)/en_US/Accessibility.xml \
602 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
603 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
604 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
605 $(call MSG_L1,Validating $<)
606 $(QUIET)$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $<
607 $(QUIET)$(APPEND) -t "$@" "done"
608
609
610 # Handy aliases.
611 validate-accessibility:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run
612 accessibility:: $(PATH_STAGE_BIN)/Accessibility.pdf
613 accessibility-html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html
614
615
616 #################################################################################################################################
617 # UserManual.* - The user manual in all its output variations (DITA-OT). #
618 #################################################################################################################################
619
620 #
621 # 1. We copy/hardlink all the files under <lang>/dita/* to the corresponding
622 # VBOX_PATH_MANUAL_OUTBASE location. This is mainly to deal with DITO-OT's
623 # inability to search for topic files in more than one place, so we have to
624 # gather generated and static topic sources + the .ditamap-file(s) in one
625 # place.
626 #
627
628 # Determin the basic set of files as dictated by the en_US version of the
629 # user manual (relative to $(lang)/dita). We'll use these to supply
630 # incomplete manual translations.
631 # Note! This includes .png as well as .dita and .ditamap files.
632 VBOX_USER_MANUAL_DITA_BASIC_SRC_FILES := \
633 $(notdir $(wildcard $(VBOX_PATH_MANUAL_SRC)/en_US/dita/*.ditamap)) \
634 $(addprefix topics/,$(notdir $(wildcard $(VBOX_PATH_MANUAL_SRC)/en_US/dita/topics/*dita))) \
635 $(addprefix topics/images/,$(notdir $(wildcard $(VBOX_PATH_MANUAL_SRC)/en_US/dita/topics/images/*png)))
636
637 ##
638 # Produce copying rules for one language and defining the variable
639 # VBOX_USER_MANUAL_DITA_STAGED_FILES_<lang> for use in prerequisite to
640 # anything producing a version of the user manual.
641 #
642 # @param 1 lang
643 define def_vbox_copy_manual_dita_src_files
644 VBOX_USER_MANUAL_DITA_SRC_FILES_$(1) := \
645 $$(notdir $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$1/dita/*.ditamap)) \
646 $$(addprefix topics/,$$(notdir $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$1/dita/topics/*dita))) \
647 $$(addprefix topics/images/,$$(notdir $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$1/dita/topics/images/*png)))
648 VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK := \
649 $$(filter-out $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)), $$(VBOX_USER_MANUAL_DITA_BASIC_SRC_FILES))
650
651 VBOX_USER_MANUAL_DITA_STAGED_FILES_$(1) = \
652 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/, \
653 $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)) \
654 $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK) \
655 topics/reference.dtd)
656
657 ifneq ($$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)),)
658 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/,$$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1))): \
659 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/% : \
660 $$(VBOX_PATH_MANUAL_SRC)/$1/dita/% | $$$$(dir $$$$@)
661 $$(QUIET)$$(INSTALL_STAGING) -m 0644 -- "$$<" "$$(@D)/"
662 endif
663
664 ifneq ($$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK),)
665 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/,$$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK)): \
666 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/% : \
667 $$(VBOX_PATH_MANUAL_SRC)/en_US/dita/% | $$$$(dir $$$$@)
668 $$(QUIET)$$(INSTALL_STAGING) -m 0644 -- "$$<" "$$(@D)/"
669 endif
670
671 ## @todo r=bird: Dummy to shut up warnings?
672 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/reference.dtd: | $$$$(dir $$$$@)
673 $$(QUIET)$$(TOUCH) -- "$$@"
674
675 endef
676 $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES),$(evalcall2 def_vbox_copy_manual_dita_src_files,$(lang)))
677
678
679 #
680 # 2. Convert the manpages from Docbook refentry files to DITA reference files.
681 #
682 # In DITA links needs proper href values, with both file and ID. Since the
683 # source only has IDs, we scan all topics and refentry-files alike and
684 # generate a mapping database before we start converting them. This DB is
685 # then used at the end of each conversion to fix the hrefs.
686 #
687 # Steps taken converting individual Docbook refentry files:
688 # 1. refsect2_to_refsect1.py flattens the refsect1/refsect2 hierarchy,
689 # creating a .xml version next to the final dita file.
690 # 2. docbook2dita.xsl takes that and produces a .dita-file.
691 # 3. mark_external_urls.xsl marks external links in the .dita-file.
692 # 4. add_file_to_id_only_references.py converts ID-only hrefs into
693 # href="filename.dita#ID" using the mapping DB.
694
695 ##
696 # Do per-language stuff for the refentry -> dita file conversion.
697 #
698 # The variable VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_<lang> is defined
699 # by this define and should be expaneded as a prerequisite for any rule
700 # producing a version of the user manual.
701 #
702 # @param 1 Language.
703 #
704 define def_vbox_refentry_to_dita
705 # Generate a ID to FILE mapping database that def_vbox_refentry_to_dita can apply below.
706 VBOX_USER_MANUAL_ID_MAPPING_FILE_$(1) := $$(VBOX_PATH_MANUAL_OUTBASE)/$1/id-mapping-file.db
707 OTHER_CLEAN += $(VBOX_USER_MANUAL_ID_MAPPING_FILE_$(1))
708 $$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$(1)) + $$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$(1)).lst: \
709 $$(VBOX_PATH_MANUAL_SRC)/build_id_to_file_mapping.py \
710 $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$1/*.xml) \
711 $$(filter %.dita,$$(VBOX_USER_MANUAL_DITA_STAGED_FILES_$(1))) \
712 | $$$$(dir $$$$@)
713 $$(call MSG_L1, $$<)
714 $$(APPEND) -nt "[email protected]" $$(filter-out %.py,$$^)
715 $$(QUIET)$$(VBOX_BLD_PYTHON) "$$<" --output "$$@" @"[email protected]"
716
717 # We must copy over the man_VBoxManage-dhcpserver-dhcpoptions.xml include
718 # file, so that xsltproc can easily find it when running docbook2dita.xsl.
719 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/man_VBoxManage-dhcpserver-dhcpoptions.xml: \
720 $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/man_VBoxManage-dhcpserver-dhcpoptions.xml) \
721 $$(VBOX_PATH_MANUAL_SRC)/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xml) | $$$$(dir $$$$@)
722 $$(QUIET)$$(INSTALL_STAGING) -m 0644 -- "$$<" "$$(@D)/"
723
724 # Accumulated list of conversion output file names to be used as a
725 # prerequisite in rules producing a version of the user manual.
726 VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$1 := \
727 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/user_isomakercmd-man.dita
728
729 ## @todo r=bird: quite not sure why this isn't treated like the rest...
730 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/user_isomakercmd-man.dita: \
731 $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \
732 $$(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_isomakercmd-man.xml | $$$$(dir $$$$@)
733 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) \
734 --maxdepth 6000 \
735 --output "$$@" \
736 "$$<" \
737 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/user_isomakercmd-man.xml
738 endef # def_vbox_refentry_to_dita
739
740 ## Convert a single refentry file to dita.
741 # @param 1 Language
742 # @param 2 Filename w/o extension.
743 define def_vbox_refentry_file_to_dita
744 VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$1 += $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).dita
745 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).dita \
746 + $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml: \
747 $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \
748 $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml) \
749 $$(VBOX_PATH_MANUAL_SRC)/mark_external_urls.xsl \
750 $$(VBOX_PATH_MANUAL_SRC)/add_file_to_id_only_references.py \
751 $$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$1) \
752 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/man_VBoxManage-dhcpserver-dhcpoptions.xml \
753 $$(VBOX_XML_CATALOG) \
754 $$(VBOX_XML_CATALOG_DOCBOOK) \
755 $$(VBOX_XML_CATALOG_MANUAL) \
756 $$(VBOX_XML_ENTITIES) \
757 $$(VBOX_VERSION_STAMP) \
758 | $$$$(dir $$$$@)
759 $$(call MSG_TOOL,xsltproc docbook2dita.xsl,,$$(firstword $$(filter %.xml,$$^)),$$@)
760 $$(QUIET)$$(RM) -f "$$@"
761 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/refsect2_to_refsect1.py \
762 -i $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml) \
763 -o "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml"
764 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output "$$@" \
765 "$$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl" \
766 "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml"
767 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output "$$@" \
768 "$$(VBOX_PATH_MANUAL_SRC)/mark_external_urls.xsl" "$$@"
769 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/add_file_to_id_only_references.py \
770 --mapping-file "$$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$1)" "$$@"
771 endef # def_vbox_refentry_file_to_dita
772
773 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES) \
774 ,$(evalcall2 def_vbox_refentry_to_dita,$(lang)) \
775 $(foreach file, $(basename $(VBOX_MANUAL_XML_REFENTRY_FILES) man_vboximg-mount man_VBoxHeadless) \
776 ,$(evalcall2 def_vbox_refentry_file_to_dita,$(lang),$(file))))
777
778
779 #
780 # 3a. UserManual.pdf - Run dost.jar from DITA-OT to produce the PDF version.
781 #
782 # Note! The /tempdir is deleted, recreated, used and deleted again for each
783 # run. So, be careful where you point it.
784 # Note! This crappy utility may fail to find files (or fail to parse the
785 # command line) and still return a successfully (0) exit code.
786 #
787 define def_ditamap_to_pdf
788 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual.pdf \
789 + $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual_pdf.log \
790 +| $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita.list \
791 +| $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita.xml.properties: \
792 $$(VBOX_MANUAL_XML_FILES_COMMON) \
793 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
794 $$(VBOX_USER_MANUAL_DITA_STAGED_FILES_$(lang)) \
795 $$(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$(lang))
796 $$(QUIET)$$(RM) -f -- "$$@" "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual_pdf.log" \
797 $$(QUIET)$$(RM) -Rf -- "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-pdf/"
798 $$(QUIET)$$(call VBOX_DITA_RUN_DOST,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-pdf,, \
799 "/i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap" \
800 "/transtype:pdf" \
801 "/outdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)" \
802 "/tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp_pdf", \
803 ,,"--logfile=$$(@D)/UserManual_pdf.log")
804
805 ditamap-to-pdf: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual.pdf
806 endef
807 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES),$(evalcall2 def_ditamap_to_pdf,$(lang)))
808
809 # Useful aliases
810 usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf
811
812
813 #
814 # 3b. UserManual.html - Run dost.jar from DITA-OT to produce the HTML versions.
815 #
816 # We produce both chunked and singled paged HTML versions of the en_US manual
817 # mainly for uploading to virtualbox.org. The docs build box produces a zip
818 # including these.
819 #
820
821 ## @todo front page
822 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
823 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \
824 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_en_US)
825 $(call MSG_L1,Building html chunks $@)
826 $(QUIET)$(RM) -Rf -- "$(@D)" "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-chunks/"
827 $(QUIET)$(MKDIR) -- "$(@D)"
828 $(QUIET)$(call VBOX_DITA_RUN_DOST,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-chunks,, \
829 "/i:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual.ditamap" \
830 "/transtype:xhtml" \
831 "/outdir:$(@D)" \
832 "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml_chunks" \
833 ,,"--logfile=$(@D)/UserManual_xhtml.log")
834
835 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
836
837 # We must modify UserManual.ditamap here, removing all chunk attributes and put
838 # a chunk="to-content" on the root element (bookmap). For clues see:
839 # https://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/chunking.html
840 # https://www.oxygenxml.com/forum/post25114.html?hilit=dita%20xhtml%20chunk#p25114
841 # We stich the index.html and UserManual-Single.html files together using
842 # SED since we haven't been able to convince DITA-OT to combine them.
843 ## @todo front page
844 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
845 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \
846 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_en_US)
847 $(call MSG_L1,Building html chunks $@)
848 $(QUIET)$(RM) -f -- "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap"
849 $(SED) -r -e 's/ chunk=["][^"]+["]//g' -e 's/<bookmap /<bookmap chunk="to-content" /' \
850 --output "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap" \
851 "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual.ditamap"
852 $(QUIET)$(RM) -Rf -- "$(@D)" "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-single/"
853 $(QUIET)$(MKDIR) -- "$(@D)"
854 $(QUIET)$(call VBOX_DITA_RUN_DOST,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-single,, \
855 "/i:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap" \
856 "/transtype:xhtml" \
857 "/outdir:$(@D)" \
858 "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml_single" \
859 ,,"--logfile=$(@D)/UserManual-Single_xhtml.log")
860 $(SED) -ne '1,/<body>/{p}' \
861 --output "$@" "$(@D)/UserManual-Single.html"
862 $(APPEND) -n "$@" "<!-- index inject: -->"
863 $(SED) -ne '/<body>/,/<\/body>/{/<body>/d;/<\/body>/d;s/UserManual-Single.html/UserManual.html/g;p}' \
864 --append "$@" "$(@D)/index.html"
865 $(APPEND) -n "$@" "<!-- resuming main file: -->"
866 $(SED) -ne '/<body>/,99999999{/<body>/d;s/UserManual-Single.html/UserManual.html/g;p}' \
867 --append "$@" "$(@D)/UserManual-Single.html"
868
869 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
870
871 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
872 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
873 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
874 $(call MSG_L1,Packing documentation $@)
875 $(QUIET)$(RM) -f $@
876 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- $(VBOX_ZIP) \
877 -9 -r "$@" \
878 "html-chunks" \
879 "html-single" \
880 -x "html-chunks/dita.list" \
881 -x "html-chunks/dita.xml.properties" \
882 -x "html-chunks/UserManual_xhtml.log" \
883 -x "html-single/dita.list" \
884 -x "html-single/dita.xml.properties" \
885 -x "html-single/UserManual-Single_xhtml.log" \
886 -x "html-single/index.html" \
887 -x "html-single/UserManual-Single.html"
888
889 html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
890
891
892 #
893 # A few things which are shared between htmlhelp and qhelp docs.
894 # TODO: This is Docbook related work. Left here in case we can reuse some of
895 # the ideas from it for DITA-OT.
896 #
897
898 VBOX_DOCBOOK_HTMLHELP_FORMATCFG = \
899 $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
900 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
901 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
902
903 # Prepare the XSL file for our title page, htmlhelp and qhelp variant.
904 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl: \
905 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
906 $(call MSG_L1,xsltproc $<)
907 $(QUIET)$(RM) -f [email protected] $@
908 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
909 $(QUIET)$(MV) -f [email protected] $@
910
911 # end old stuff.
912
913 if defined(VBOX_WITH_DOCS_QHELP) && !defined(VBOX_ONLY_SDK)
914 #
915 # 3c. VirtualBox.qch + VirtualBox.qhc - Qt compressed help and collection file.
916 #
917 # See usermanual.pdf under DITA-OT-xxxxx/doc folder for details.
918 #
919
920 # Enable Qt and locate the Qt help generator.
921 ifdef VBOX_WITH_QT6
922 USES += qt6
923 VBOX_QHELPGENERATOR = $(PATH_TOOL_QT6_LIBEXEC)/qhelpgenerator
924 else
925 USES += qt5
926 VBOX_QHELPGENERATOR_VERSION_MINOR = $(shell $(REDIRECT) -E QT_QPA_PLATFORM_PLUGIN_PATH=$(PATH_SDK_QT5)/plugins -- $(PATH_TOOL_QT5_BIN)/qhelpgenerator -v 2>/dev/null | $(SED) -ne 's/.*(Qt [1-9][0-9]*\.\([1-9][0-9]*\)\.[1-9][0-9]*).*$$/\1/p')
927 VBOX_QHELPGENERATOR = $(PATH_TOOL_QT5_BIN)/$(if-expr $(VBOX_QHELPGENERATOR_VERSION_MINOR) >= 12,qhelpgenerator,qcollectiongenerator)
928 endif
929
930 ## Build QHelp version of manual for given language.
931 # @param 1 Language
932 # @param 2 The language specific qhelp output directory.
933 define def_vbox_usermanual_as_qhelp
934
935 # 1. Generate UserManual.hpp using DITA-OT.
936 #
937 # Setting HHCDIR here so that it fails to locate hcc.exe and always skips the
938 # compilation step that produces the .chm-file, since we don't need it and it
939 # mangles the path so it always fails anyway.
940 ## @todo front page.
941 $(2)/UserManual.hhp: \
942 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_$(1)) \
943 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$(1))
944 $$(QUIET)$$(RM) -Rf -- "$$(@D)" "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-qhelp/"
945 $$(QUIET)$$(MKDIR) -- "$$(@D)"
946 $$(QUIET)$$(call VBOX_DITA_RUN_DOST,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-qhelp, -EHHCDIR="$$(@D)", \
947 "/i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap" \
948 "/transtype:htmlhelp" \
949 "/outdir:$(2)" \
950 "/tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp_qhelp" \
951 ,,"--logfile=$(2)/UserManual_htmlhelp.log")
952
953
954 ditamap-to-htmlhelp: $(2)/UserManual.hhp
955
956 # 2. Generate a Qt Help Project file (QHP) using htmlhelp-qthelp.py.
957 $(2)/UserManual.qhp: \
958 $(2)/UserManual.hhp \
959 $$(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py \
960 | $$$$(dir $$$$@)
961 $$(call MSG_L1,htmlhelp-qthelp.py $$<,=> $$@)
962 $$(QUIET)$$(RM) -f -- "$$@"
963 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py \
964 -d "$$(<D)" -o "$$@" -f UserManual.hhp -t UserManual.hhc
965
966 # 3. Copy the Qt help configuration file from source to the output dir.
967 $(2)/UserManual.qhcp: \
968 $$(VBOX_PATH_MANUAL_SRC)/UserManual.qhcp \
969 | $(2)/UserManual.hhp # (Must not run parallel to UserManual.hpp, so it can safely nuke the output dir.)
970 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
971
972 # 4. Run the Qt help generator to produce the .qhp and .qch files.
973 $(2)/UserManual.qch \
974 + $(2)/UserManual.qhc: \
975 $(2)/UserManual.qhcp \
976 $(2)/UserManual.qhp \
977 | $$$$(dir $$$$@)
978 $$(call MSG_L1,$$(notdir $$(VBOX_QHELPGENERATOR)) $$<,=> $$@)
979 $$(QUIET)$$(RM) -f $$@
980 ifdef VBOX_WITH_QT6
981 $$(QUIET)$$(REDIRECT) -- $$(VBOX_QHELPGENERATOR) $$<
982 else
983 $$(QUIET)$$(REDIRECT) -E QT_QPA_PLATFORM_PLUGIN_PATH=$$(PATH_SDK_QT5)/plugins -- $$(VBOX_QHELPGENERATOR) $$<
984 endif
985 $$(call MSG_L1,Fresh QCH is now at $$@)
986
987 endef # def_vbox_usermanual_as_qhelp
988
989 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES) \
990 ,$(evalcall2 def_vbox_usermanual_as_qhelp,$(lang),$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp))
991
992 qhelp:: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/, $(VBOX_QHELP_OUTPUT_FILES))
993
994 endif # VBOX_WITH_DOCS_QHELP && !VBOX_ONLY_SDK
995
996
997 #################################################################################################################################
998 # Miscellaneous #
999 #################################################################################################################################
1000
1001 #
1002 # ChangeLog.html
1003 #
1004 # This XSLT rule formats en_US/user_ChangeLog.xml (which includes the actual change log
1005 # contained in user_ChangeLogImpl.xml) as a standalone HTML file.
1006 #
1007 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
1008 $(VBOX_PATH_MANUAL_SRC)/en_US/docbook-changelog-formatcfg.xsl \
1009 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml \
1010 $(VBOX_XML_CATALOG) \
1011 $(VBOX_XML_CATALOG_DOCBOOK) \
1012 $(VBOX_XML_CATALOG_MANUAL) \
1013 $(VBOX_XML_ENTITIES) | $$(dir $$@)
1014 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
1015 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" "$<" $(filter %.xml,$^)
1016 $(call MSG_L1,Fresh ChangeLog.html is now at $@)
1017
1018 cl-html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
1019
1020
1021 #
1022 # VBoxManage man pages (parts also required by VBoxManage built-in help).
1023 #
1024
1025 ##
1026 # Emits rules for preprocessing refentry sources (applying remarks element),
1027 # and for producing the actual man pages.
1028 # $(evalcall2 def_vbox_refentry_to_manpage)
1029 # @param 1 The language
1030 # @param 2 The file name (no path).
1031 define def_vbox_refentry_to_manpage
1032 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2): \
1033 $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
1034 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl \
1035 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT) \
1036 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
1037 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
1038 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
1039 $$(QUIET)$$(RM) -f "$$@"
1040 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ \
1041 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl $$<
1042 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output [email protected] $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT) $$@
1043 $$(QUIET)$$(MV) -f -- "[email protected]" "$$@"
1044 if defined(VBOX_HAVE_XMLLINT)
1045 $$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$@
1046 endif
1047
1048 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(patsubst man_%,%.1,$(basename $(2))): \
1049 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2) \
1050 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage.xsl \
1051 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
1052 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
1053 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
1054 $$(QUIET)$$(RM) -f "$$@"
1055 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage.xsl $$<
1056 endef
1057 $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
1058 , $(evalcall2 def_vbox_refentry_to_manpage,$(lang),$(file))))
1059
1060 # Handy aliases.
1061 validate-manpages:: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_REFENTRY_FILES))
1062 man-experiment:: $(foreach lang,$(VBOX_MANUAL_ALL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
1063 ,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/$(patsubst man_%,%.1,$(basename $(file)))))
1064
1065 #
1066 # Manually updating the DHCP option list taken from VirtualBox.xidl
1067 #
1068 dhcpoptions: $(PATH_ROOT)/doc/manual/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xsl \
1069 $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
1070 $(call VBOX_XSLTPROC) --output "$(PATH_ROOT)/doc/manual/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xml" $^
1071
1072
1073 #
1074 # Packing the docs into a zip file (part of the packing pass on the docs build box).
1075 #
1076 ifneq ($(VBOX_MANUAL_PACK),)
1077 $(PATH_STAGE_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
1078 $(call MSG_L1,Packing documentation $@)
1079 $(QUIET)$(RM) -f $@
1080 $(QUIET)$(REDIRECT) -C $(PATH_STAGE_BIN) -- $(VBOX_ZIP) -9 $@ $(notdir $^)
1081 endif
1082
1083endif # if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
1084
1085include $(FILE_KBUILD_SUB_FOOTER)
1086
Note: See TracBrowser for help on using the repository browser.

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