VirtualBox

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

Last change on this file since 98860 was 98860, checked in by vboxsync, 2 years ago

Docs: bugref:10302. Now qhelp build uses dita stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 46.6 KB
Line 
1# $Id: Makefile.kmk 98860 2023-03-07 14:26:25Z 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# -- VirtualBox.chm
35#
36# Both files end up in PATH_STAGE_BIN.
37#
38# Both targets indirectly depend on the XML files in this directory;
39# "indirectly" because we first copy them to PATH_TARGET and hack them
40# up a bit for variable substitution and such (see below).
41# The toolchains are roughly like this:
42#
43# -- PDF file via Apache FOP: pre-process the XML files in PATH_TARGET,
44# then create a .FO file (another XML format for "formatted objects")
45# via xsltproc, then feed the .FO file to Apache FOP to create the PDF.
46#
47# -- PDF file via LaTeX: pre-process the XML files in PATH_TARGET, then
48# run our custom "dblatex" perl script on UserManual.xml, which parses
49# the XML (using the Perl SAX parsers) and dumps a matching LaTeX file
50# to UserManual.tex. This is then regularly processed by pdflatex to
51# generate PDF.
52#
53# -- CHM file: again, pre-process the XML files in PATH_TARGET, then use
54# xsltproc to create a .HHP file for the Microsoft Help Compiler, then
55# feed that file to it.
56#
57
58SUB_DEPTH = ../..
59include $(KBUILD_PATH)/subheader.kmk
60
61ifndef VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED
62 include $(PATH_SUB_CURRENT)/Config.kmk
63endif
64
65
66#
67# Globals
68#
69
70# Error out if someone tries to override old globals.
71ifdef HTMLHELPOPTS
72 $(error HTMLHELPOPTS was renamed to VBOX_HTMLHELP_OPTS!)
73endif
74ifdef DOCBOOKPATH
75 $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
76endif
77ifdef DOCBOOKPATH
78 $(error DOCBOOKPATH was renamed to VBOX_PATH_DOCBOOK!)
79endif
80ifdef XML_CATALOG
81 $(error XML_CATALOG was renamed to VBOX_XML_CATALOG!)
82endif
83ifdef XML_CATALOG_DOCBOOK
84 $(error XML_CATALOG_DOCBOOK was renamed to VBOX_XML_CATALOG_DOCBOOK!)
85endif
86ifdef PDFLATEX_INTERACTION
87 $(error PDFLATEX_INTERACTION was renamed to VBOX_PDFLATEX_INTERACTION!)
88endif
89ifdef PDFLATEX
90 $(error PDFLATEX was renamed to VBOX_PDFLATEX_CMD!)
91endif
92ifdef HHC
93 $(error HHC was renamed to VBOX_HHC!)
94endif
95
96VBOX_DITA_CONVERTER_PATH = $(PATH_ROOT)/src/libs/dbdita-1.0
97VBOX_DITA_ORIGINAL_PATH = $(PATH_ROOT)/src/libs/dita-ot-1.8.5
98VBOX_DITA_PATH = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-1.8.5
99
100VBOX_QHELP_OUTPUT_FILES = \
101 UserManual.qch \
102 UserManual.qhc
103
104# VBOX_PDFLATEX_INTERACTION = errorstopmode - Use this when you wants to figure out build failures
105# without catting the log a million times.
106VBOX_PDFLATEX_INTERACTION ?= batchmode
107ifeq ($(KBUILD_HOST),win)
108 ifndef VBOX_PDFLATEX
109 VBOX_PDFLATEX := $(firstword $(rsort $(wildcard $(KBUILD_DEVTOOLS)/win.x86/miktex-portable/*/miktex/bin/pdflatex.exe)))
110 ifneq ($(VBOX_PDFLATEX),)
111 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION)
112 endif
113 endif
114 ifndef VBOX_PDFLATEX
115 # Tell MiKTeX to automatically download packages if system wide install.
116 VBOX_PDFLATEX := pdflatex
117 VBOX_PDFLATEX_CMD = $(VBOX_PDFLATEX) -halt-on-error -interaction $(VBOX_PDFLATEX_INTERACTION) --enable-installer
118 endif
119else
120 VBOX_PDFLATEX ?= pdflatex
121 VBOX_PDFLATEX_HALT = $(shell ( $(VBOX_PDFLATEX) -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
122 VBOX_PDFLATEX_CMD = pdflatex $(VBOX_PDFLATEX_HALT) -interaction $(VBOX_PDFLATEX_INTERACTION)
123endif
124
125# Windows HTML Help Workshop compiler (stupid thing always returns an error!)
126VBOX_HHC = -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe
127
128
129# Additional xsltproc options when generating
130VBOX_HTMLHELP_OPTS ?=
131
132# SDK related globals.
133VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
134VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
135VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
136
137
138#
139# Targets
140#
141
142BLDDIRS += $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, $(VBOX_MANUAL_LANGUAGES))
143
144if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
145 if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
146 INSTALLS += VBox-docs-sdkref
147 endif
148
149 ifdef VBOX_WITH_DOCS_HTML
150 INSTALLS += VBox-docs-usermanual-html
151 VBOX_PATH_BIN_HTML = $(PATH_STAGE_BIN)/UserManual-html.zip
152 else # Do not build html.
153 VBOX_PATH_BIN_HTML =
154 endif
155
156 ifdef VBOX_WITH_DOCS_CHM
157 INSTALLS += VBox-docs-usermanual-chm
158 VBOX_PATH_BIN_CHM = $(PATH_STAGE_BIN)/VirtualBox.chm
159 else # Do not build chm.
160 VBOX_PATH_BIN_CHM =
161 endif
162
163 ifdef VBOX_WITH_DOCS_QHELP
164 INSTALLS += VBox-docs-usermanual-qhc
165 INSTALLS += VBox-docs-usermanual-qch
166 ifdef VBOX_WITH_QT6
167 USES += qt6
168 QHELPGENERATOR = $(PATH_TOOL_QT6_LIBEXEC)/qhelpgenerator
169 else # Qt5
170 USES += qt5
171 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')
172 QHELPGENERATOR = $(PATH_TOOL_QT5_BIN)/$(if-expr $(QHELPGENERATOR_VERSION_MINOR) >= 12,qhelpgenerator,qcollectiongenerator)
173 endif
174 endif
175 ifdef VBOX_WITH_DOCS_QHELP_PACKING
176 VBOX_PATH_BIN_QHELP = $(PATH_STAGE_BIN)/UserManual.qch
177 VBOX_PATH_BIN_QHELP += $(PATH_STAGE_BIN)/UserManual.qhc
178 else # Do not install/pack qhelp.
179 VBOX_PATH_BIN_QHELP =
180 endif
181
182
183 ifndef VBOX_ONLY_SDK
184 VBOX_MANUAL_PACK += \
185 $(PATH_STAGE_BIN)/UserManual.pdf \
186 $(VBOX_PATH_BIN_HTML) \
187 $(VBOX_PATH_BIN_CHM) \
188 $(VBOX_PATH_BIN_QHELP)
189 INSTALLS += VBox-docs-usermanual
190
191 ifdef VBOX_WITH_DOCS_TRANSLATIONS
192 INSTALLS += VBox-docs-usermanual-l10n
193 VBOX_MANUAL_PACK += \
194 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf)
195 ifdef VBOX_WITH_DOCS_CHM
196 INSTALLS += VBox-docs-usermanual-l10n-chm
197 VBOX_MANUAL_PACK += \
198 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm)
199 endif
200 endif
201 endif # !VBOX_ONLY_SDK
202
203 ifdef VBOX_WITH_DOCS_ACCESSIBILITY
204 INSTALLS += VBox-docs-accessibility
205 INSTALLS += VBox-docs-accessibility-html
206 endif
207
208 ifdef VBOX_ONLY_DOCS
209 PACKING += $(PATH_STAGE_BIN)/VBoxDocumentation.zip
210 endif
211
212 ifdef VBOX_WITH_DOCS_TRANSLATIONS
213 VBOX_MANUAL_LANGUAGES += $(VBOX_MANUAL_ADD_LANGUAGES)
214 endif
215
216 $(foreach lang,$(VBOX_MANUAL_LANGUAGES), \
217 $(eval VBOX_MANUAL_XML_FILES_GENERATED_$$(lang) := \
218 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
219 $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
220 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_man_VBoxHeadless.xml \
221 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_man_vboximg-mount.xml \
222 $$(VBOX_PATH_MANUAL_OUTBASE)/$$(lang)/user_isomakercmd-man.xml))
223
224 VBOX_SDKREF_XML_FILES = \
225 SDKRef.xml
226
227 VBOX_ACCESSIBILITY_XML_FILES = \
228 Accessibility.xml
229
230
231 # Wildcard the images path for every supported language
232 $(foreach f,$(VBOX_MANUAL_LANGUAGES), \
233 $(eval VBOX_MANUAL_PNG_FILES_$$(f) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(f)/%,%,$$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(f)/images/*.png))))
234
235 VBOX_MANUAL_TEX_UNICODE_FILES = \
236 $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
237
238 VBOX_MANUAL_LATEX_FILES_TARGET = \
239 $(addprefix UserManual.,aux log out toc tex)
240
241 VBOX_SDKREF_LATEX_FILES_TARGET = \
242 $(addprefix SDKRef.,aux log out toc tex)
243
244 VBOX_ACCESSIBILITY_LATEX_FILES_TARGET = \
245 $(addprefix Accessibility.,aux log out toc tex)
246
247 BLDDIRS += \
248 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, \
249 $(addsuffix /images, $(VBOX_MANUAL_LANGUAGES)) \
250 $(addsuffix /html-single, $(VBOX_MANUAL_LANGUAGES)) \
251 $(addsuffix /html-chunks, $(VBOX_MANUAL_LANGUAGES)) \
252 $(addsuffix /qhelp, $(VBOX_MANUAL_LANGUAGES)) \
253 $(addsuffix /qhelp/images, $(VBOX_MANUAL_LANGUAGES)) \
254 $(addsuffix /HTMLHelp, $(VBOX_MANUAL_LANGUAGES)) \
255 $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_LANGUAGES)) \
256 )
257
258 # Explicit cleaning has some overlap with default cleaning rules, since this
259 # Makefile is using very complex conditionals for selectively creating
260 # specific files, and not everyone remembers to use the same with "kmk clean".
261 OTHER_CLEAN += \
262 $(VBOX_XML_CATALOG) \
263 $(VBOX_XML_CATALOG_DOCBOOK) \
264 $(VBOX_XML_CATALOG_MANUAL) \
265 $(VBOX_XML_ENTITIES) \
266 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
267 $(VBOX_XML_XREF_TO_TEXT) \
268 $(VBOX_XML_XREF_TO_TEXT).cat \
269 $(addprefix user_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
270 $(VBOX_MANUAL_XML_REFENTRY_FILES) \
271 $(patsubst man_%,%.1,$(basename $(VBOX_MANUAL_XML_REFENTRY_FILES))) \
272 man_VBoxHeadless.xml \
273 user_man_VBoxHeadless.xml \
274 man_vboximg-mount.xml \
275 user_man_vboximg-mount.xml \
276 isomakercmd-man.xml \
277 user_isomakercmd-man.xml \
278 $(VBOX_MANUAL_LATEX_FILES_TARGET) \
279 $(VBOX_MANUAL_PNG_FILES_$(lang)) \
280 $(notdir $(VBOX_MANUAL_TEX_UNICODE_FILES)) \
281 $(addprefix HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(lang))) \
282 $(addprefix qhelp/, $(VBOX_MANUAL_PNG_FILES_$(lang))) \
283 html-single/UserManual.html \
284 $(addprefix qhelp/, UserManual.qhp UserManual.qhcp $(VBOX_QHELP_OUTPUT_FILES)) \
285 $(addprefix HTMLHelp/, index.html go01.html) \
286 $(addprefix qhelp/, index.html go01.html) \
287 $(addprefix html-chunks/, index.html go01.html) \
288 $(foreach n,01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 \
289 ,html-chunks/ch$(n).html \
290 html-chunks/re$(n).html \
291 HTMLHelp/ch$(n).html \
292 HTMLHelp/re$(n).html \
293 $(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)) \
294 qhelp/ch$(n).html \
295 qhelp/re$(n).html \
296 $(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)) ) \
297 $(foreach n,a b c \
298 ,html-chunks/ap$(n).html \
299 HTMLHelp/ap$(n).html \
300 $(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) \
301 qhelp/ap$(n).html \
302 $(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) ) \
303 $(foreach n,01 02 03 04 05 \
304 ,html-chunks/pr$(n).html \
305 HTMLHelp/pr$(n).html \
306 $(foreach s,01 02 03 04 05 06 07 08,HTMLHelp/pr$(n)s$(s).html) \
307 qhelp/pr$(n).html \
308 $(foreach s,01 02 03 04 05 06 07 08,qhelp/pr$(n)s$(s).html) ) \
309 HTMLHelp/toc.hhc \
310 HTMLHelp/htmlhelp.hhp \
311 qhelp/toc.hhc \
312 qhelp/htmlhelp.hhp \
313 UserManual.pdf \
314 VirtualBox.chm \
315 $(VBOX_QHELP_OUTPUT_FILES) \
316 ChangeLog.html \
317 validatemanual.run \
318 validateaccessibility.run \
319 validatesdkref.run \
320 )) \
321 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl \
322 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
323 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf) \
324 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm) \
325 $(PATH_STAGE_BIN)/UserManual.pdf \
326 $(PATH_STAGE_BIN)/VirtualBox.chm \
327 \
328 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
329 $(VBOX_SDKREF_LATEX_FILES_TARGET) \
330 SDKRef.pdf \
331 ) \
332 $(PATH_STAGE_BIN)/sdk/docs/SDKRef.pdf \
333 \
334 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, \
335 $(VBOX_ACCESSIBILITY_LATEX_FILES_TARGET) \
336 html-single/Accessibility.html \
337 Accessibility.pdf \
338 ) \
339 $(PATH_STAGE_BIN)/Accessibility.html \
340 $(PATH_STAGE_BIN)/Accessibility.pdf \
341 \
342 $(VBOX_DOC_XIDL_SRC_TMP) \
343 $(VBOX_MANUAL_APIREF_TMP)
344
345endif # if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
346
347#
348# target for installing UserManual.pdf
349#
350VBox-docs-usermanual_INST = $(INST_BIN)
351VBox-docs-usermanual_MODE = a+r,u+w
352VBox-docs-usermanual_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf
353
354VBox-docs-usermanual-qhc_INST = $(INST_BIN)
355VBox-docs-usermanual-qhc_MODE = a+r,u+w
356VBox-docs-usermanual-qhc_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qhc
357
358VBox-docs-usermanual-qch_INST = $(INST_BIN)
359VBox-docs-usermanual-qch_MODE = a+r,u+w
360VBox-docs-usermanual-qch_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/UserManual.qch
361
362#
363# target for installing translated UserManual_*.pdf
364#
365VBox-docs-usermanual-l10n_INST = $(INST_BIN)
366VBox-docs-usermanual-l10n_MODE = a+r,u+w
367VBox-docs-usermanual-l10n_SOURCES = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/UserManual.pdf=>UserManual_$(f).pdf)
368
369#
370# target for installing the chunked HTML docs
371#
372VBox-docs-usermanual-html_INST = $(INST_BIN)
373VBox-docs-usermanual-html_MODE = a+r,u+w
374VBox-docs-usermanual-html_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip=>UserManual-html.zip
375
376#
377# target for installing VirtualBox.chm
378#
379VBox-docs-usermanual-chm_INST = $(INST_BIN)
380VBox-docs-usermanual-chm_MODE = a+r,u+w
381VBox-docs-usermanual-chm_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
382
383#
384# target for installing translated VirtualBox_*.chm
385#
386VBox-docs-usermanual-l10n-chm_INST = $(INST_BIN)
387VBox-docs-usermanual-l10n-chm_MODE = a+r,u+w
388VBox-docs-usermanual-l10n-chm_SOURCES = $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(f)/VirtualBox.chm=>VirtualBox_$(f).chm)
389
390#
391# target for installing SDKRef.pdf
392#
393VBox-docs-sdkref_INST = $(INST_SDK)docs/
394VBox-docs-sdkref_MODE = a+r,u+w
395VBox-docs-sdkref_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf
396
397#
398# target for installing Accessibility.pdf
399#
400VBox-docs-accessibility_INST = $(INST_BIN)
401VBox-docs-accessibility_MODE = a+r,u+w
402VBox-docs-accessibility_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.pdf
403
404#
405# target for installing Accessibility.html
406#
407VBox-docs-accessibility-html_INST = $(INST_BIN)
408VBox-docs-accessibility-html_MODE = a+r,u+w
409VBox-docs-accessibility-html_SOURCES = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html
410
411if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
412
413 ##
414 # Morph man pages into manual sections.
415 # $(evalcall2 def_vbox_refentry_to_user_sect1)
416 # @param 1 Language.
417 # @param 2 the refentry xml base file name.
418 # @param 3 the full refentry xml file path.
419 define def_vbox_refentry_to_user_sect1
420 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): $(3) \
421 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
422 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
423 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
424 $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(filter %.xml,$$^),$$@)
425 $$(QUIET)$$(RM) -f "$$@"
426 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$<
427 endef
428 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
429man_VBoxHeadless.xml \
430man_vboximg-mount.xml \
431, $(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),$(file),$(VBOX_PATH_MANUAL_SRC)/$(lang)/$(file))))
432 $(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
433,$(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),isomakercmd-man.xml,$(PATH_ROOT)/src/VBox/Runtime/common/fs/isomakercmd-man.xml))
434
435
436 # Generates the VBoxManage command overview include file (shared between
437 # languages) from the refsynopsisdiv section of the man pages.
438 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)): \
439 $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-overview.xsl \
440 $$(patsubst overview_%,$$(VBOX_PATH_MANUAL_SRC)/en_US/%,$$(notdir $$@)) \
441 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
442 $(VBOX_XML_ENTITIES) | $$(dir $$@)
443 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
444 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" $< $(filter %.xml,$^)
445
446
447
448
449
450 ##########################################################################################
451 #
452 # Shared rules for PDF generation
453 #
454 ##########################################################################################
455
456 ifndef VBOX_OSE
457 # copy ucs.sty and related files
458 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/ucs.sty):
459 $(call MSG_L1,Copying unicode support for LaTeX)
460 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_MANUAL_TEX_UNICODE_FILES) "$(@D)"
461 endif
462
463 # copy the PNG files.
464 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
465 define def_vbox_cp_images_pdf
466 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
467 $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
468 $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
469 $$(call MSG_L1,Copying temporary $$< => $$@)
470 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
471 endef
472 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_cp_images_pdf))
473
474
475 ##########################################################################################
476 #
477 # UserManual.pdf
478 #
479 ##########################################################################################
480
481
482 # Generate PDF from LaTeX
483 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
484 define def_vbox_usermanual_tex_to_pdf
485 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
486 $$(out_dir)/UserManual.pdf: \
487 $$(out_dir)/UserManual.tex \
488 $$(if $$(VBOX_OSE),,$$(out_dir)/ucs.sty) \
489 $$(addprefix $$(out_dir)/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) | $$$$(dir $$$$@)
490 # PDF generation via Latex: generate the .tex file
491 $$(call MSG_L1,pdflatex $$< (four passes) -> $$@)
492 $$(QUIET)$$(REDIRECT) -w+ti /dev/null -C $$(@D) -- $$(VBOX_PDFLATEX_CMD) UserManual.tex
493 $$(QUIET)$$(REDIRECT) -w+ti /dev/null -C $$(@D) -- $$(VBOX_PDFLATEX_CMD) UserManual.tex
494 $$(QUIET)$$(REDIRECT) -w+ti /dev/null -C $$(@D) -- $$(VBOX_PDFLATEX_CMD) UserManual.tex
495 $$(QUIET)$$(REDIRECT) -w+ti /dev/null -C $$(@D) -- $$(VBOX_PDFLATEX_CMD) UserManual.tex
496 $$(QUIET)$$(SED) -ne '/Warning: Hyper reference/p' $$(basename $$<).log
497 $$(QUIET)$$(SED) -n \
498 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
499 $$(basename $$@).log
500 $$(call MSG_L1,Fresh LaTeX-generated PDF is now at $$@)
501 endef
502 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_tex_to_pdf))
503
504 # Generate LaTeX from XML
505 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
506 define def_vbox_usermanual_xml_to_tex
507 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
508 $$(out_dir)/UserManual.tex: \
509 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \
510 $$(VBOX_MANUAL_XML_FILES_COMMON) \
511 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
512 $$(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
513 $$(if $$(VBOX_HAVE_XMLLINT),$$(out_dir)/validatemanual.run,) \
514 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
515 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
516 $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(firstword $$(filter %.xml,$$^)),$$@)
517 $$(QUIET)$$(RM) -f $$(addprefix $$(@D)/,$$(VBOX_MANUAL_LATEX_FILES_TARGET))
518 # generate TeX source from processed docbook and store it in UserManual.tex.tmp;
519 # pass current language to xsltproc in TARGETLANG variable
520 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG $(lang) \
521 -o [email protected] $$(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $$<
522 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
523 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
524 $$(QUIET)$$(SED) \
525 -e 's|^\\QUOTE{}|\\OQ{}|g' \
526 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
527 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
528 --output $$@ [email protected]
529 $$(QUIET)$$(RM) -f [email protected]
530 endef
531 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_xml_to_tex))
532
533 # Useful aliases
534 usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf
535
536 debug-usermanual:
537 $(MAKE) --pretty-command-printing -j1 VBOX_PDFLATEX_INTERACTION=errorstopmode $(PATH_STAGE_BIN)/UserManual.pdf
538
539 #
540 # Generate rules for validating the UserManual.xml. These are invoked
541 # automatically at build time, but can also be manually invoked via the
542 # 'validatemanual' and 'validatemanual_<lang>' aliases.
543 #
544 define def_vbox_validate_xml
545 validatemanual_$(lang):: $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run
546 $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run: \
547 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \
548 $$(VBOX_MANUAL_XML_FILES_COMMON) \
549 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
550 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
551 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@)
552 $$(call MSG_L1,Validating $$<)
553 $$(QUIET)$$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$<
554 $$(QUIET)$$(APPEND) -t "$$@" "done"
555 endef
556 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_validate_xml))
557
558
559 # Handy aliases.
560 validatemanual:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),validatemanual_$(lang))
561
562
563
564 #
565 # SDKRef.pdf
566 #
567
568 # Replace <tt> tags in VirtualBox.xidl.
569 $(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
570 $(call MSG_L1,Generating $@)
571 $(QUIET)$(SED) -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
572 -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
573 --output $@ $<
574
575 # Generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
576 $(VBOX_MANUAL_APIREF_TMP): $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
577 $(call MSG_L1,Generating $@)
578 $(QUIET)$(VBOX_XSLTPROC) $(VBOX_XSLTPROC_OPTS) --xinclude --nonet -o $@ $< $(VBOX_DOC_XIDL_SRC_TMP)
579
580 # Turn SDKRef.xml into LaTeX.
581 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: \
582 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
583 $(VBOX_MANUAL_APIREF_TMP) \
584 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
585 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run,) \
586 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
587 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
588 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
589 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
590 # generate TeX source from processed docbook and store it in SDKRef.tex.tmp
591 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG en_US \
592 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
593 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
594 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
595 $(QUIET)$(SED) \
596 -e 's|^\\QUOTE{}|\\OQ{}|g' \
597 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
598 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
599 --output $@ [email protected]
600 $(QUIET)$(RM) -f [email protected]
601
602 # Turn SDKRef.tex into a PDF.
603 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.pdf: \
604 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
605 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
606 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
607 $(call MSG_L1,pdflatex $< (three passes))
608 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
609 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
610 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) SDKRef.tex
611 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
612 $(QUIET)$(SED) -n \
613 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
614 $(basename $<).log
615 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
616
617 # Validating SDKRef.xml. It is invoked automatically at build time,
618 # but can also be manually invoked via the 'validate-sdkref' alias.
619 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run: \
620 $(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef.xml \
621 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_SDKREF_XML_FILES)) \
622 $(VBOX_MANUAL_APIREF_TMP) \
623 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
624 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
625 $(call MSG_L1,Validating $<)
626 $(QUIET)$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $<
627 $(QUIET)$(APPEND) -t "$@" "done"
628
629
630 # Handy aliases.
631 validate-sdkref:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatesdkref.run
632 sdkref:: $(PATH_STAGE_BIN)/sdk/docs/SDKRef.pdf
633
634
635
636 #
637 # Accessibility.pdf
638 #
639
640 # Turn Accessibility.xml into LaTeX.
641 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.tex: \
642 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
643 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
644 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run,) \
645 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
646 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
647 $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
648 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_ACCESSIBILITY_LATEX_FILES_TARGET))
649 # generate TeX source from processed docbook and store it in Accessibility.tex.tmp
650 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG en_US \
651 -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
652 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
653 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
654 $(QUIET)$(SED) \
655 -e 's|^\\QUOTE{}|\\OQ{}|g' \
656 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
657 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
658 --output $@ [email protected]
659 $(QUIET)$(RM) -f [email protected]
660
661 # Turn Accessibility.tex into a PDF.
662 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.pdf: \
663 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/Accessibility.tex \
664 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
665 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
666 $(call MSG_L1,pdflatex $< (three passes))
667 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
668 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
669 $(QUIET)$(REDIRECT) -C $(<D) -- $(VBOX_PDFLATEX_CMD) Accessibility.tex
670 $(QUIET)$(SED) -ne '/Warning: Hyper reference/p' $(basename $<).log
671 $(QUIET)$(SED) -n \
672 -e '/Warning: There were \(undefined references\|multiply-defined labels\)/{p; q 1}' \
673 $(basename $<).log
674 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
675
676 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html: \
677 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
678 $(VBOX_DOCBOOK_HTML_ONE_PAGE_FORMATCFG) \
679 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
680 $(VBOX_XML_ENTITIES) | $$(dir $$@)
681 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
682 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
683 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html \
684 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl \
685 $<
686
687 # Validating Accessibility.xml. It is invoked automatically at build time,
688 # but can also be manually invoked via the 'validate-accessibility' alias.
689 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run: \
690 $(VBOX_PATH_MANUAL_SRC)/en_US/Accessibility.xml \
691 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_ACCESSIBILITY_XML_FILES)) \
692 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
693 $(VBOX_XML_ENTITIES) $(MAKEFILE_CURRENT) | $$(dir $$@)
694 $(call MSG_L1,Validating $<)
695 $(QUIET)$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $<
696 $(QUIET)$(APPEND) -t "$@" "done"
697
698
699 # Handy aliases.
700 validate-accessibility:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/validateaccessibility.run
701 accessibility:: $(PATH_STAGE_BIN)/Accessibility.pdf
702 accessibility-html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/Accessibility.html
703
704
705 # A few things which are shared between htmlhelp and qhelp docs.
706 VBOX_DOCBOOK_HTMLHELP_FORMATCFG = \
707 $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
708 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
709 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
710
711 # Prepare the XSL file for our title page, htmlhelp and qhelp variant.
712 $(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl: \
713 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
714 $(call MSG_L1,xsltproc $<)
715 $(QUIET)$(RM) -f [email protected] $@
716 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
717 $(QUIET)$(MV) -f [email protected] $@
718
719
720 ifdef VBOX_WITH_DOCS_CHM
721 #
722 # VirtualBox.chm
723 #
724 # We first generate a .hhp help source file from the preprocessed
725 # DocBook XML files, as defined above, then feed that into the
726 # Microsoft Help Compiler.
727
728 # Generate CHM from HHP
729 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
730 define def_vbox_usermanual_hhp_to_chm
731 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
732 $$(out_dir)/VirtualBox.chm: \
733 $$(out_dir)/HTMLHelp/htmlhelp.hhp \
734 $$(addprefix $$(out_dir)/HTMLHelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
735 | $$$$(dir $$$$@)
736 $$(call MSG_L1,hhc $$<,=> $$@)
737 $$(QUIET)$$(RM) -f $$@
738 $$(QUIET)$$(VBOX_HHC) $$(subst /,\\,$$<)
739 $$(call MSG_L1,Fresh CHM is now at $$@)
740 endef
741 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_hhp_to_chm))
742
743 # Generate HHP from XML
744 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
745 define def_vbox_usermanual_xml_to_hhp
746 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
747 $$(out_dir)/HTMLHelp/htmlhelp.hhp: \
748 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \
749 $$(VBOX_MANUAL_XML_FILES_COMMON) \
750 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
751 $$(VBOX_DOCBOOK_HTMLHELP_FORMATCFG) \
752 $$(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl \
753 $$(if $$(VBOX_HAVE_XMLLINT),$$(out_dir)/validatemanual.run,) \
754 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
755 $$(VBOX_XML_ENTITIES) | $$$$(dir $$$$@)
756 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
757 $$(QUIET)$$(RM) -f $$@
758 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$(@D)/ \
759 --stringparam htmlhelp.chm \
760 $$(subst /,\\,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/VirtualBox.chm) \
761 $$(HTMLHELPOPTS) $$(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl \
762 $$<
763 endef
764 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_xml_to_hhp))
765
766 # copy the PNG files.
767 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
768 define def_vbox_cp_images_htmlhelp
769 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/HTMLHelp
770 $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
771 $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
772 $$(call MSG_L1,Copying temporary $$< => $$@)
773 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
774 endef
775 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_htmlhelp)))
776
777 endif # VBOX_WITH_DOCS_CHM
778
779
780 # Packing the docs into a zip file
781 $(PATH_STAGE_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
782 $(call MSG_L1,Packing documentation $@)
783 $(QUIET)$(RM) -f $@
784 $(QUIET)$(REDIRECT) -C $(PATH_STAGE_BIN) -- $(VBOX_ZIP) -9 $@ $(notdir $^)
785
786
787 ##########################################################################################
788 #
789 # UserManual.html
790 #
791 ##########################################################################################
792 VBOX_DOCBOOK_HTML_ONE_PAGE_FORMATCFG = \
793 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl \
794 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
795 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
796
797 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
798 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
799 $(VBOX_MANUAL_XML_FILES_COMMON) \
800 $(VBOX_MANUAL_XML_FILES_GENERATED_en_US) \
801 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
802 $(VBOX_DOCBOOK_HTML_ONE_PAGE_FORMATCFG) \
803 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
804 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
805 $(VBOX_XML_ENTITIES) | $$(dir $$@)
806 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
807 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
808 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
809 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl \
810 $<
811
812 VBOX_DOCBOOK_HTML_CHUNKS_FORMATCFG = \
813 $(VBOX_PATH_MANUAL_SRC)/docbook-html-chunks-formatcfg.xsl \
814 $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
815 $(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
816
817 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
818 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
819 $(VBOX_MANUAL_XML_FILES_COMMON) \
820 $(VBOX_MANUAL_XML_FILES_GENERATED_en_US) \
821 $(VBOX_DOCBOOK_HTML_CHUNKS_FORMATCFG) \
822 $(addprefix $(VBOX_PATH_MANUAL_SRC)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
823 $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/en_US/validatemanual.run,) \
824 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
825 $(VBOX_XML_ENTITIES) | $$(dir $$@)
826 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
827 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) \
828 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
829 --stringparam chunk.section.depth 0 \
830 $(VBOX_PATH_MANUAL_SRC)/docbook-html-chunks-formatcfg.xsl \
831 $<
832
833 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
834 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
835 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
836 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US))
837 $(call MSG_L1,Packing documentation $@)
838 $(QUIET)$(RM) -f $@
839 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- $(VBOX_ZIP) \
840 -9 -r $@ html-single html-chunks $(VBOX_MANUAL_PNG_FILES_en_US)
841
842 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
843 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
844 qhelp:: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/qhelp/, $(VBOX_QHELP_OUTPUT_FILES))
845 html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
846
847 ##########################################################################################
848 #
849 # Docbook to Dita conversion of our refentry files
850 #
851 ##########################################################################################
852 define def_vbox_refentry_to_dita
853 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(addsuffix .dita,$(basename $(2))): \
854 $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \
855 $(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
856 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
857 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
858
859 $$(QUIET)$$(RM) -f "$$@"
860 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2) $(VBOX_PATH_MANUAL_SRC)/refsect2_replace.xsl $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2)
861 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
862 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $$@ $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2)
863 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $$@ $(VBOX_PATH_MANUAL_SRC)/mark_external_urls.xsl $$@
864 endef
865 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) man_vboximg-mount.xml\
866, $(evalcall2 def_vbox_refentry_to_dita,$(lang),$(file))))
867
868 refentry-to-dita: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file, $(basename $(VBOX_MANUAL_XML_REFENTRY_FILES)) man_vboximg-mount \
869 ,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/dita/topics/$(file).dita))
870
871 VBOX_REFENTRY_DITA_FILES = $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file, $(basename $(VBOX_MANUAL_XML_REFENTRY_FILES)) man_vboximg-mount \
872 ,$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/dita/topics/$(file).dita))
873
874 ##########################################################################################
875 #
876 # Use DITA-OT to create pdf/hhp out of UserManual.ditamap. See usermanual.pdf under
877 # DITA-OT-xxxxx/doc folder for details.
878 #
879 ##########################################################################################
880# Copy the dita library under out folder since at each use the library modifies some
881# run-time configuation files.
882$(VBOX_DITA_PATH):
883 $(MKDIR) -p $(VBOX_DITA_PATH)
884 cp -R $(VBOX_DITA_ORIGINAL_PATH)/* $(VBOX_DITA_PATH)/
885
886 VBOX_DITA_PATH_LIB ?= $(VBOX_DITA_PATH)/lib
887 VBOX_DITA_ENV_SETUP ?= $(REDIRECT) \
888 -E 'ANT_OPTS=-Xmx512m -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl' \
889 -E 'ANT_HOME=$(VBOX_DITA_PATH)/tools/ant' \
890 -E 'DITA_DIR=$(VBOX_DITA_PATH)' \
891 -A 'PATH=:$(VBOX_DITA_PATH)/tools/ant/bin' \
892 -E 'CLASSPATH=$(VBOX_DITA_PATH_LIB)/dost.jar' \
893 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)' \
894 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/commons-codec-1.4.jar' \
895 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/resolver.jar' \
896 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/icu4j.jar' \
897 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/xercesImpl.jar' \
898 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/xml-apis.jar' \
899 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/saxon/saxon9.jar' \
900 -A 'CLASSPATH=:$(VBOX_DITA_PATH_LIB)/saxon/saxon9-dom.jar' \
901 --
902
903 VBOX_USER_MANUAL_DITA_FILES = $(wildcard $(VBOX_PATH_MANUAL_SRC)/en_US/dita/topics/*dita)
904 VBOX_USER_MANUAL_DITA_IMAGES = $(wildcard $(VBOX_PATH_MANUAL_SRC)/en_US/dita/topics/images/*)
905
906 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual.ditamap:
907 $(QUIET)$(MKDIR) -p $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/topics/images
908 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_PATH_MANUAL_SRC)/en_US/dita/UserManual.ditamap "$(@D)"
909 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_USER_MANUAL_DITA_FILES) "$(@D)/topics"
910 $(QUIET)touch -- "$(@D)/topics/reference.dtd"
911 $(QUIET)$(INSTALL_STAGING) -m0644 -- $(VBOX_USER_MANUAL_DITA_IMAGES) "$(@D)/topics/images"
912
913 define def_ditamap_to_pdf
914 ditamap-to-pdf: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual_dita.pdf
915 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual_dita.pdf: \
916 $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
917 $(VBOX_DITA_PATH) \
918 $(VBOX_REFENTRY_DITA_FILES) \
919 $$(VBOX_PATH_MANUAL_SRC)/correct_references.py
920 $$(call MSG_L1,correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics)
921 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics
922 $(QUIET)$(call VBOX_DITA_ENV_SETUP) \
923 $(VBOX_JAVA) -jar $(VBOX_DITA_PATH_LIB)/dost.jar /i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
924 /transtype:pdf /ditadir:$(VBOX_DITA_PATH) /outdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1) /tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp
925
926 endef
927 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_ditamap_to_pdf,$(lang)))
928
929 #
930 # ChangeLog.html
931 #
932 # This XSLT rule formats en_US/user_ChangeLog.xml (which includes the actual change log
933 # contained in user_ChangeLogImpl.xml) as a standalone HTML file.
934 #
935 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
936 $(VBOX_PATH_MANUAL_SRC)/en_US/docbook-changelog-formatcfg.xsl \
937 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml \
938 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(VBOX_XML_CATALOG_MANUAL) \
939 $(VBOX_XML_ENTITIES) | $$(dir $$@)
940 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
941 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --output "$@" "$<" $(filter %.xml,$^)
942 $(call MSG_L1,Fresh ChangeLog.html is now at $@)
943
944 cl-html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
945
946
947
948endif # if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
949
950
951#
952# VBoxManage man pages (parts also required by VBoxManage built-in help).
953#
954
955##
956# Emits rules for preprocessing refentry sources (applying remarks element),
957# and for producing the actual man pages.
958# $(evalcall2 def_vbox_refentry_to_manpage)
959# @param 1 The language
960# @param 2 The file name (no path).
961define def_vbox_refentry_to_manpage
962 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2): \
963 $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
964 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl \
965 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT) \
966 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
967 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
968 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
969 $$(QUIET)$$(RM) -f "$$@"
970 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ \
971 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl $$<
972 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output [email protected] $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT) $$@
973 $$(QUIET)$$(MV) -f -- "[email protected]" "$$@"
974 if defined(VBOX_HAVE_XMLLINT)
975 $$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$@
976 endif
977
978 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(patsubst man_%,%.1,$(basename $(2))): \
979 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$(2) \
980 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage.xsl \
981 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
982 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
983 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
984 $$(QUIET)$$(RM) -f "$$@"
985 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage.xsl $$<
986endef
987$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
988, $(evalcall2 def_vbox_refentry_to_manpage,$(lang),$(file))))
989
990ifdef VBOX_WITH_DOCS_QHELP
991 #
992 # VirtualBox.qch/VirtualBox.qhc
993 #
994 # We first generate a .hhp help source file from the preprocessed
995 # DocBook XML files, as defined above, then feed that into a converter
996 # creating the suitable input for creating a QHelp collection file.
997
998 # Generate QCH from QHelp source
999 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
1000 define def_vbox_usermanual_qhp_to_qch
1001 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
1002 $$(out_dir)/qhelp/UserManual.qch + \
1003 $$(out_dir)/qhelp/UserManual.qhc: \
1004 $$(out_dir)/qhelp/UserManual.qhcp \
1005 $$(out_dir)/qhelp/UserManual.qhp \
1006 $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
1007 | $$$$(dir $$$$@)
1008 $$(call MSG_L1,$$(notdir $$(QHELPGENERATOR)) $$<,=> $$@)
1009 $$(QUIET)$$(RM) -f $$@
1010 $$(QUIET)$$(REDIRECT) -E QT_QPA_PLATFORM_PLUGIN_PATH=$$(PATH_SDK_QT5)/plugins -- $$(QHELPGENERATOR) $$<
1011 $$(call MSG_L1,Fresh QCH is now at $$@)
1012 endef
1013 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_qhp_to_qch))
1014
1015 # Generate QHP from HHP for QHelp
1016 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
1017 define def_vbox_usermanual_hhp_qhelp_to_qhp
1018 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
1019 $$(out_dir)/qhelp/UserManual.qhp: \
1020 $$(out_dir)/qhelp/UserManual.hhp \
1021 $$(addprefix $$(out_dir)/qhelp/,$$(VBOX_MANUAL_PNG_FILES_$(lang))) \
1022 | $$$$(dir $$$$@)
1023 $$(call MSG_L1,htmlhelp-qthelp.py $$<,=> $$@)
1024 $$(QUIET)$$(RM) -f $$@
1025 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/htmlhelp-qthelp.py -d $$(<D) -o $$@ -f UserManual.hhp -t UserManual.hhc
1026 endef
1027 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_hhp_qhelp_to_qhp))
1028
1029
1030 define def_ditamap_to_htmlhelp
1031 ditamap-to-htmlhelp: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp
1032 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp/UserManual.hhp: \
1033 $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
1034 $(VBOX_DITA_PATH) \
1035 $(VBOX_REFENTRY_DITA_FILES) \
1036 $$(VBOX_PATH_MANUAL_SRC)/correct_references.py
1037 $$(call MSG_L1,correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics)
1038 $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/correct_references.py -d $(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics
1039 $(QUIET)$(call VBOX_DITA_ENV_SETUP) \
1040 $(VBOX_JAVA) -jar $(VBOX_DITA_PATH_LIB)/dost.jar /i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap \
1041 /transtype:htmlhelp /ditadir:$(VBOX_DITA_PATH) /outdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/qhelp /tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp
1042
1043 endef
1044 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_ditamap_to_htmlhelp,$(lang)))
1045
1046 # copy the qhcp file.
1047 define def_vbox_cp_qhcp
1048 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
1049 $$(out_dir)/UserManual.qhcp: \
1050 $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/% | $$$$(dir $$$$@)
1051 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
1052 endef
1053 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_qhcp)))
1054
1055 # copy the PNG files.
1056 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
1057 define def_vbox_cp_images_qhelp
1058 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/qhelp
1059 $(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
1060 $$(out_dir)/% : $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
1061 $$(call MSG_L1,Copying temporary $$< => $$@)
1062 $$(QUIET)$$(INSTALL_STAGING) -m0644 -- '$$<' '$$(@D)'
1063 endef
1064 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_qhelp)))
1065
1066endif # VBOX_WITH_DOCS_QHELP
1067
1068# Handy aliases.
1069validate-manpages:: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_REFENTRY_FILES))
1070man-experiment:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
1071 ,$$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/$(patsubst man_%,%.1,$(basename $(file)))))
1072
1073#
1074# Manually updating the DHCP option list taken from VirtualBox.xidl
1075#
1076dhcpoptions: $(PATH_ROOT)/doc/manual/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xsl \
1077 $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
1078 $(call VBOX_XSLTPROC) --output "$(PATH_ROOT)/doc/manual/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xml" $+
1079
1080
1081include $(FILE_KBUILD_SUB_FOOTER)
1082
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