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