VirtualBox

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

Last change on this file since 98603 was 98603, checked in by vboxsync, 22 months ago

Docs: bugref:10302. Adding preprocessing step to replace rect2 with rect1.

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