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