VirtualBox

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

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

manual: Updated docs for xref-to-text.xsl rule and removed a temporary file it now uses. bugref:10302

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