VirtualBox

source: vbox/trunk/doc/manual/Config.kmk@ 98110

Last change on this file since 98110 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.2 KB
Line 
1# $Id: Config.kmk 98103 2023-01-17 14:15:46Z vboxsync $
2## @file
3# kBuild Configuration file for the manual.
4#
5
6#
7# Copyright (C) 2010-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
28ifndef VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED
29VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED = 1
30
31# Include the top-level configure file.
32ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED
33 include $(PATH_ROOT)/Config.kmk
34endif
35
36
37#
38# Globals.
39#
40
41# Source location.
42VBOX_PATH_MANUAL_SRC := $(PATH_ROOT)/doc/manual
43# Output location.
44VBOX_PATH_MANUAL_OUTBASE := $(PATH_OBJ)/manual
45
46## List of refentry files (manpages).
47VBOX_MANUAL_XML_REFENTRY_FILES := \
48 man_VBoxManage-common.xml \
49 man_VBoxManage-list.xml \
50 man_VBoxManage-showvminfo.xml \
51 man_VBoxManage-registervm.xml \
52 man_VBoxManage-unregistervm.xml \
53 man_VBoxManage-createvm.xml \
54 man_VBoxManage-modifyvm.xml \
55 man_VBoxManage-snapshot.xml \
56 man_VBoxManage-clonevm.xml \
57 man_VBoxManage-movevm.xml \
58 man_VBoxManage-encryptvm.xml \
59 man_VBoxManage-startvm.xml \
60 man_VBoxManage-controlvm.xml \
61 man_VBoxManage-import.xml \
62 man_VBoxManage-export.xml \
63 man_VBoxManage-mediumio.xml \
64 man_VBoxManage-sharedfolder.xml \
65 man_VBoxManage-dhcpserver.xml \
66 man_VBoxManage-debugvm.xml \
67 man_VBoxManage-extpack.xml \
68 man_VBoxManage-unattended.xml \
69 man_VBoxManage-cloud.xml \
70 man_VBoxManage-cloudprofile.xml \
71 man_VBoxManage-signova.xml \
72 man_VBoxManage-modifynvram.xml \
73 man_VBoxManage-hostonlynet.xml \
74 man_VBoxManage-updatecheck.xml \
75 man_VBoxManage-discardstate.xml \
76 man_VBoxManage-adoptstate.xml \
77 man_VBoxManage-closemedium.xml \
78 man_VBoxManage-storageattach.xml \
79 man_VBoxManage-storagectl.xml \
80 man_VBoxManage-bandwidthctl.xml \
81 man_VBoxManage-showmediuminfo.xml \
82 man_VBoxManage-createmedium.xml \
83 man_VBoxManage-modifymedium.xml \
84 man_VBoxManage-clonemedium.xml \
85 man_VBoxManage-mediumproperty.xml \
86 man_VBoxManage-encryptmedium.xml \
87 man_VBoxManage-checkmediumpwd.xml \
88 man_VBoxManage-convertfromraw.xml \
89 man_VBoxManage-setextradata.xml \
90 man_VBoxManage-getextradata.xml \
91 man_VBoxManage-setproperty.xml \
92 man_VBoxManage-usbfilter.xml \
93 man_VBoxManage-guestproperty.xml \
94 man_VBoxManage-guestcontrol.xml \
95 man_VBoxManage-metrics.xml \
96 man_VBoxManage-natnetwork.xml \
97 man_VBoxManage-hostonlyif.xml \
98 man_VBoxManage-usbdevsource.xml
99
100## List of user manual XML files.
101VBOX_MANUAL_XML_FILES = \
102 UserManual.xml \
103 user_Preface.xml \
104 user_Introduction.xml \
105 user_Installation.xml \
106 user_BasicConcepts.xml \
107 user_GuestAdditions.xml \
108 user_Storage.xml \
109 user_Networking.xml \
110 user_Frontends.xml \
111 user_VBoxManage.xml \
112 user_AdvancedTopics.xml \
113 user_Technical.xml \
114 user_VirtualBoxAPI.xml \
115 user_Troubleshooting.xml \
116 user_Security.xml \
117 user_KnownIssues.xml \
118 user_ChangeLog.xml \
119 user_ThirdParty.xml \
120 user_PrivacyPolicy.xml \
121 user_Glossary.xml \
122 oracle-accessibility-ohc-en.xml \
123 oracle-diversity.xml \
124 oracle-support-en.xml
125
126## List of user manual XML files common for all languages.
127VBOX_MANUAL_XML_FILES_COMMON = \
128 $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml
129
130
131# Tool locations.
132ifndef VBOX_OSE
133 # use docbook from our tools directory
134 VBOX_PATH_DOCBOOK ?= $(KBUILD_DEVTOOLS)/common/DocBook/v1.69.1
135 VBOX_PATH_DOCBOOK_DTD ?= $(KBUILD_DEVTOOLS)/common/docbook-xml/v4.5
136else
137 # use docbook of the build host
138 VBOX_PATH_DOCBOOK ?= /usr/share/xml/docbook/stylesheet/docbook-xsl
139 VBOX_PATH_DOCBOOK_DTD ?= /usr/share/xml/docbook/schema/dtd/4.5
140endif
141VBOX_XML_CATALOG ?= $(VBOX_PATH_MANUAL_OUTBASE)/vbox-doc.cat
142VBOX_XML_CATALOG_DOCBOOK ?= $(VBOX_PATH_MANUAL_OUTBASE)/docbook.cat
143VBOX_XML_CATALOG_MANUAL ?= $(VBOX_PATH_MANUAL_OUTBASE)/manual.cat
144VBOX_XML_ENTITIES ?= $(VBOX_PATH_MANUAL_OUTBASE)/all-entities.ent
145
146# xsltproc with the catalog trick if applicable (set XML_DEBUG_CATALOG to
147# non-zero value to debug file/uri resolution through the catalogs, using
148# one of them is enough, they show the same information).
149ifdef VBOX_XML_CATALOG
150 VBOX_XSLTPROC_WITH_CAT = $(REDIRECT) -E "XML_CATALOG_FILES=$(if $(2),$(2),$(VBOX_XML_CATALOG))" -E "XML_DEBUG_CATALOG=" $1 -- \
151 $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS) --path "$(VBOX_PATH_MANUAL_OUTBASE)"
152 VBOX_XMLLINT_WITH_CAT = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" -E "XML_DEBUG_CATALOG=" -- \
153 $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS) --path "$(VBOX_PATH_MANUAL_OUTBASE)"
154else
155 VBOX_XSLTPROC_WITH_CAT = $(if $(1), $(REDIRECT) $1 --,) $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS) \
156 --path "$(VBOX_PATH_MANUAL_OUTBASE)"
157 VBOX_XMLLINT_WITH_CAT = $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS) --path "$(VBOX_PATH_MANUAL_OUTBASE)"
158endif
159
160
161# File name of the generated stylesheet for transforming xref elements into
162# name user manual sections.
163VBOX_XML_XREF_TO_TEXT = xref-to-text.xsl
164
165##
166# Emits rules for preprocessing refentry sources (applying remarks element),
167# and for producing the actual man pages.
168#
169# $(evalcall2 def_vbox_refentry_preprocess_for_manpage)
170# @param 1 The output directory.
171# @param 2 The XML file name (no path).
172# @param 3 The XML file with full path.
173# @param 4 Non-empty if xrefs to replace.
174# @param 5 Language code (optional if $4 is empty).
175define def_vbox_refentry_preprocess_for_manpage
176$(1)/$(2): \
177 $(3) \
178 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl \
179 $(if $(4), $$(VBOX_PATH_MANUAL_OUTBASE)/$(5)/$$(VBOX_XML_XREF_TO_TEXT),) \
180 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
181 $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
182 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
183 $$(QUIET)$$(RM) -f "$$@"
184 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ \
185 "$$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manpage-preprocessing.xsl" $$<
186ifneq ($(4),)
187 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@.tmp \
188 $$(VBOX_PATH_MANUAL_OUTBASE)/$(5)/$$(VBOX_XML_XREF_TO_TEXT) $$@
189 $$(QUIET)$$(MV) -f -- "$$@.tmp" "$$@"
190endif
191if defined(VBOX_HAVE_XMLLINT) && "$(USER)" == "bird" # Effing stuff happends on build servers, probably kmk related...
192 $$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$@
193endif
194endef
195
196##
197# Generate a single header file containing everything (no C file).
198#
199# @param 1 Destination file.
200# @param 2 Full source file path.
201# @param 3 Help infix.
202define def_vbox_single_refentry_to_h
203$(1).ts +| $(1): \
204 $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP) \
205 $$(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) \
206 $(2) \
207 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) $(MAKEFILE) | $$$$(dir $$$$@)
208 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(filter %.xml,$$^),$$(patsubst %.ts,%,$$@))
209 $$(QUIET)$$(APPEND) -tn "$$@" \
210 '/* Autogenerated by $$(notdir $$(filter %.xsl,$$^)), do not edit! */' \
211 '' \
212 '#include <iprt/message.h>' \
213 '#include <iprt/assertcompile.h>' \
214 '' \
215 'typedef enum HELP_CMD_$(3)' \
216 '{' \
217 ' HELP_CMD_INVALID = 0,'
218 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$$@") \
219 --stringparam 'g_sMode' 'cmd' $$(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) $(2)
220 $$(QUIET)$$(APPEND) -n "$$@" \
221 ' HELP_CMD_END' \
222 '} HELP_CMD_VBOXMANAGE;' \
223 ''
224 $$(NLTAB)$$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$$@") \
225 --stringparam 'g_sMode' 'subcmd' $$(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) $(2)
226 $$(QUIET)$$(APPEND) -n "$$@" \
227 ''
228 $$(NLTAB)$$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$$@") $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP) $(2)
229 $$(QUIET)$$(APPEND) -n "$$@" \
230 '' \
231 '/* end of file */'
232 $$(QUIET)$$(CP) --changed -- "$$@" "$$(patsubst %.ts,%,$$@)"
233endef
234
235
236#
237# Make sure we've got a rule to make the output directory.
238#
239BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE)
240
241
242ifdef VBOX_XML_CATALOG
243 # Trickery for making sure that the file:/// URLs end up with exactly 3
244 # slashes, both on Unixy OSes (where the absolute path contributes one more,
245 # and some very picky xsltproc variants are floating around which do not work
246 # quite correctly with file:////, doing incorrect filename transformations)
247 # and on Windows (where the absolute path starts with a drive letter).
248 VBOX_FILE_URL_MAYBE_SLASH = $(if $(eq $(KBUILD_HOST),win),/,)
249 #
250 # To avoid network I/O for fetching DTDs, we generate catalogs mapping the public
251 # entity IDs to local files. (Obviously, only done when we have local files.)
252 #
253 # Create a catalog file for xsltproc that points to docbook catalog.
254 $(VBOX_XML_CATALOG): $(VBOX_PATH_MANUAL_SRC)/Config.kmk | $$(dir $$@)
255 $(call MSG_L1,Creating catalog $@)
256 $(QUIET)$(APPEND) -tn "$@" \
257 '<?xml version="1.0"?>' \
258 '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \
259 '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
260 ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
261 ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
262 ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
263 ' <delegateSystem systemIdStartString="http://docbook.org/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
264 ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
265 ' <delegateURI uriStartString="http://docbook.org/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \
266 ' <delegateSystem systemIdStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
267 ' <delegateSystem systemIdStartString="$(VBOX_PATH_MANUAL_OUTBASE)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
268 ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
269 ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_OUTBASE)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
270 ' <delegateURI uriStartString="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
271 ' <delegateURI uriStartString="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_OUTBASE)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \
272 '</catalog>'
273
274 # Create a docbook catalog file for xsltproc that points to the local docbook files.
275 $(VBOX_XML_CATALOG_DOCBOOK): $(VBOX_PATH_MANUAL_SRC)/Config.kmk | $$(dir $$@)
276 $(call MSG_L1,Creating catalog $@)
277 $(QUIET)$(APPEND) -tn "$@" \
278 '<?xml version="1.0"?>' \
279 '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \
280 '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
281 ' <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/dbpoolx.mod"/>' \
282 ' <public publicId="-//OASIS//DTD DocBook XML V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>' \
283 ' <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/dbcentx.mod"/>' \
284 ' <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/dbnotnx.mod"/>' \
285 ' <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/dbgenent.mod"/>' \
286 ' <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/dbhierx.mod"/>' \
287 ' <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/soextblx.dtd"/>' \
288 ' <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/calstblx.dtd"/>' \
289 ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5" rewritePrefix="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)"/>' \
290 ' <rewriteSystem systemIdStartString="http://docbook.org/xml/4.5" rewritePrefix="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)"/>' \
291 ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.5" rewritePrefix="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)"/>' \
292 ' <rewriteURI uriStartString="http://docbook.org/xml/4.5" rewritePrefix="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)"/>' \
293 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsa.ent"/>' \
294 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsb.ent"/>' \
295 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsc.ent"/>' \
296 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsn.ent"/>' \
297 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amso.ent"/>' \
298 ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsr.ent"/>' \
299 ' <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-box.ent"/>' \
300 ' <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr1.ent"/>' \
301 ' <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr2.ent"/>' \
302 ' <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-dia.ent"/>' \
303 ' <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk1.ent"/>' \
304 ' <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk2.ent"/>' \
305 ' <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk3.ent"/>' \
306 ' <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk4.ent"/>' \
307 ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat1.ent"/>' \
308 ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat2.ent"/>' \
309 ' <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-num.ent"/>' \
310 ' <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-pub.ent"/>' \
311 ' <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-tech.ent"/>' \
312 '</catalog>'
313
314 # Create a docbook catalog file for xsltproc that points to the local manual files in non-default locations
315 $(VBOX_XML_CATALOG_MANUAL): $(VBOX_PATH_MANUAL_SRC)/Config.kmk | $$(dir $$@)
316 $(call MSG_L1,Creating catalog $@)
317 $(QUIET)$(APPEND) -tn "$@" \
318 '<?xml version="1.0"?>' \
319 '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \
320 '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
321 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/common/oracle-accessibility-ohc-en.xml" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)/en_US/oracle-accessibility-ohc-en.xml"/>' \
322 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/common/oracle-legal-notices/oracle-diversity.xml" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)/en_US/oracle-diversity.xml"/>' \
323 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/common/oracle-legal-notices/oracle-support-en.xml" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)/en_US/oracle-support-en.xml"/>' \
324 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/en_US/user_ChangeLogImpl.xml" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml"/>' \
325 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xsl" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_OUTBASE)/titlepage-htmlhelp.xsl"/>' \
326 $(foreach x,user_VBoxManage_CommandsOverview.xml user_isomakercmd-man.xml $(addprefix user_,$(VBOX_MANUAL_XML_REFENTRY_FILES) man_VBoxHeadless.xml man_vboximg-mount.xml)\
327 ,' <system systemId="$(VBOX_PATH_MANUAL_SRC)/en_US/$(x)" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_OUTBASE)/en_US/$(x)"/>' \$(NLTAB)$(TAB)) \
328 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef_apiref.xml" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml"/>' \
329 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/en_US/all-entities.ent" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_OUTBASE)/all-entities.ent"/>' \
330 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/html/docbook.xsl" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK)/html/docbook.xsl"/>' \
331 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/html/chunk.xsl" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK)/html/chunk.xsl"/>' \
332 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/htmlhelp/htmlhelp.xsl" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK)/htmlhelp/htmlhelp.xsl"/>' \
333 ' <system systemId="$(VBOX_PATH_MANUAL_SRC)/manpages/docbook.xsl" uri="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_DOCBOOK)/manpages/docbook.xsl"/>' \
334 '</catalog>'
335
336endif # VBOX_XML_CATALOG
337
338
339ifdef VBOX_XML_ENTITIES
340
341 $(VBOX_XML_ENTITIES): $(VBOX_PATH_MANUAL_SRC)/Config.kmk $(VBOX_VERSION_STAMP) | $$(dir $$@)
342 $(call MSG_L1,Creating entities $@)
343 $(QUIET)$(APPEND) -tn "$@" \
344 '<!-- Entities for product names -->' \
345 '<!ENTITY product-version "$(VBOX_VERSION_STRING)">' \
346 '<!ENTITY product-name "Oracle VM VirtualBox">' \
347 '<!ENTITY vbox-mgr "VirtualBox Manager">' \
348 '<!ENTITY oci "Oracle Cloud Infrastructure">' \
349 '' \
350 '<!-- VBox placeholder entities -->' \
351 '<!ENTITY VBOX_VERSION_MAJOR "$(VBOX_VERSION_MAJOR)" >' \
352 '<!ENTITY VBOX_VERSION_MINOR "$(VBOX_VERSION_MINOR)" >' \
353 '<!ENTITY VBOX_VERSION_BUILD "$(VBOX_VERSION_BUILD)" >' \
354 '<!ENTITY VBOX_VERSION_STRING "$(VBOX_VERSION_STRING)" >' \
355 '<!ENTITY VBOX_VENDOR "$(VBOX_VENDOR)" >' \
356 '<!ENTITY VBOX_C_YEAR "$(VBOX_C_YEAR)" >' \
357 '<!ENTITY VBOX_PRODUCT '\''<trademark class="registered">Oracle</trademark> VM <trademark class="registered">VirtualBox</trademark>'\'' >' \
358 '' \
359 '<!-- Entities for Oracle Help Center -->' \
360 '<!ENTITY ohc-base-url "https://docs.oracle.com/en">' \
361 '<!ENTITY ohc-doc-page "&ohc-base-url;/virtualization/virtualbox/index.html">'
362
363endif # VBOX_XML_ENTITIES
364
365
366## Emit rules to produce stylesheet for translating cross references (xref)
367# to user manual chapters and sections in the man pages and --help output.
368#
369# Note! This requires processing UserManual.xml as a single document in order
370# to get the correct chapter and section numbering, so we use a catalog
371# file to replace the generated XML documents it includes with a dummy
372# one. This reduces the dependencies and recipies we require to build
373# VBoxManage and the RTIsoMaker (w/ derivatives).
374# $(evalcall2 def_vbox_xref_to_text)
375# @param 1 Language code.
376define def_vbox_xref_to_text
377$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT) \
378+ $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat: \
379 $$(VBOX_PATH_MANUAL_SRC)/$(1)/docbook-refentry-link-replacement-xsl-gen.xsl \
380 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-link-replacement-xsl-gen.xsl \
381 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/en_US/,$$(VBOX_MANUAL_XML_FILES)) \
382 $$(VBOX_MANUAL_XML_FILES_COMMON) \
383 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) $$(VBOX_XML_ENTITIES) \
384 | $$$$(dir $$$$@)
385 $$(call MSG_L1,Creating stylesheet $$@)
386 $$(QUIET)$$(APPEND) -nt "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat" \
387 '<?xml version="1.0"?>' \
388 '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \
389 '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \
390 $$(foreach x,user_VBoxManage_CommandsOverview.xml user_isomakercmd-man.xml $$(addprefix user_,$$(VBOX_MANUAL_XML_REFENTRY_FILES) man_VBoxHeadless.xml man_vboximg-mount.xml)\
391 ,' <system systemId="$$(VBOX_PATH_MANUAL_SRC)/en_US/$$(x)" uri="file://$$(VBOX_FILE_URL_MAYBE_SLASH)$$(VBOX_PATH_MANUAL_SRC)/dummy-sect1.xml"/>' \$$(NLTAB)$$(TAB)) \
392 ' <nextCatalog catalog="file://$$(VBOX_FILE_URL_MAYBE_SLASH)$$(VBOX_XML_CATALOG)"/>' \
393 '</catalog>'
394 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT,,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat) \
395 --stringparam 'g_sMode' 'first' --output "$$@" "$$<" $$(filter %UserManual.xml,$$^)
396 # Using en-US version as section and chapter names until user manual is translated as well
397 $$(foreach x, $$(VBOX_MANUAL_XML_REFENTRY_FILES)\
398 ,$$(NLTAB)$$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -ato "$$@") --stringparam 'g_sMode' 'append' \
399 "$$<" "$$(VBOX_PATH_MANUAL_SRC)/en_US/$$(x)")
400 $$(QUIET)$$(APPEND) -n "$$@" '' '</xsl:stylesheet>'
401
402BLDDIRS += $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/
403endef
404# generate rules for $(VBOX_XML_XREF_TO_TEXT)
405$(evalcall2 def_vbox_xref_to_text,en_US)
406
407#
408# Generate rules for editing the refentry to C/H style sheets.
409#
410VBOX_DOCBOOK_REFENTRY_TO_C_HELP = $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-C-help.xsl
411
412VBOX_DOCBOOK_REFENTRY_TO_H_HELP = $(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-H-help.xsl
413
414#
415# Manual dependency.
416#
417$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl: $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl
418
419
420endif # !defined(VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED)
421
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