VirtualBox

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

Last change on this file since 33587 was 33587, checked in by vboxsync, 14 years ago

try to fix windows

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 34.6 KB
Line 
1# $Id: Makefile.kmk 33587 2010-10-29 06:41:30Z vboxsync $
2## @file
3# Sub-Makefile for the VBox User Manual.
4#
5
6#
7# Copyright (C) 2006-2007 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#
19# This slightly messy makefile transforms the DocBook XML source for the
20# user manual into presentation output. We support two targets:
21#
22# -- UserManual.pdf, generated by LaTex
23#
24# -- VirtualBox.chm
25#
26# Both files end up in PATH_BIN.
27#
28# Both targets indirectly depend on the XML files in this directory;
29# "indirectly" because we first copy them to PATH_TARGET and hack them
30# up a bit for variable substitution and such (see below).
31# The toolchains are roughly like this:
32#
33# -- PDF file via Apache FOP: pre-process the XML files in PATH_TARGET,
34# then create a .FO file (another XML format for "formatted objects")
35# via xsltproc, then feed the .FO file to Apache FOP to create the PDF.
36#
37# -- PDF file via LaTeX: pre-process the XML files in PATH_TARGET, then
38# run our custom "dblatex" perl script on UserManual.xml, which parses
39# the XML (using the Perl SAX parsers) and dumps a matching latex file
40# to UserManual.tex. This is then regularly processed by pdflatex to
41# generate PDF.
42#
43# -- CHM file: again, pre-process the XML files in PATH_TARGET, then use
44# xsltproc to create a .HHP file for the Microsoft Help Compiler, then
45# feed that file to it.
46#
47
48SUB_DEPTH = ../..
49include $(KBUILD_PATH)/subheader.kmk
50
51
52##########################################################################################
53#
54# Globals
55#
56##########################################################################################
57VBOX_PATH_MANUAL_SRC := $(PATH_SUB_CURRENT)
58VBOX_PATH_MANUAL_OUTBASE := $(PATH_TARGET)/manual
59BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE)
60
61
62##########################################################################################
63#
64# Main targets
65#
66##########################################################################################
67ifdef VBOX_WITH_DOCS
68 # Default language
69 VBOX_MANUAL_LANGUAGES = en_US
70 VBOX_MANUAL_ADD_LANGUAGES = fr_FR
71
72 if defined(VBOX_ONLY_SDK) || defined(VBOX_WITH_DOCS_SDKREF)
73 ## @todo make this an install target, drop the BLDDIRS.
74 OTHERS += \
75 $(VBOX_PATH_SDK)/docs/SDKRef.pdf
76 BLDDIRS += \
77 $(VBOX_PATH_SDK)/docs
78 endif
79
80 ifdef VBOX_WITH_DOCS_CHM
81 VBOX_PATH_BIN_CHM = $(PATH_BIN)/VirtualBox.chm
82 else
83 VBOX_PATH_BIN_CHM =
84 # do not build
85 endif # !VBOX_WITH_DOCS_CHM
86
87 ifndef VBOX_ONLY_SDK
88 VBOX_MANUAL_PACK += \
89 $(PATH_BIN)/UserManual.pdf \
90 $(VBOX_PATH_BIN_CHM)
91 OTHERS += \
92 $(PATH_BIN)/UserManual.pdf
93 OTHERS.win += \
94 $(VBOX_PATH_BIN_CHM)
95 OTHERS.linux += \
96 $(VBOX_PATH_BIN_CHM)
97
98 ifdef VBOX_WITH_DOCS_TRANSLATIONS
99 OTHERS += \
100 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf)
101 ifdef VBOX_WITH_DOCS_CHM
102 OTHERS.win += \
103 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm)
104 OTHERS.linux += \
105 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm)
106 endif
107 endif
108 endif # !VBOX_ONLY_SDK
109 ifdef VBOX_ONLY_DOCS
110 PACKING += $(PATH_BIN)/VBoxDocumentation.zip
111 endif
112
113 ifdef VBOX_WITH_DOCS_TRANSLATIONS
114 VBOX_MANUAL_LANGUAGES += $(VBOX_MANUAL_ADD_LANGUAGES)
115 endif
116
117 VBOX_MANUAL_XML_CHANGELOG = \
118 user_ChangeLogImpl.xml
119
120 VBOX_MANUAL_XML_FILES = \
121 UserManual.xml \
122 user_AdvancedTopics.xml \
123 user_BasicConcepts.xml \
124 user_ChangeLog.xml \
125 user_Glossary.xml \
126 user_Frontends.xml \
127 user_Installation.xml \
128 user_GuestAdditions.xml \
129 user_Introduction.xml \
130 user_KnownIssues.xml \
131 user_PrivacyPolicy.xml \
132 user_Technical.xml \
133 user_ThirdParty.xml \
134 user_Troubleshooting.xml \
135 user_VBoxManage.xml \
136 user_VirtualBoxAPI.xml \
137 user_Storage.xml \
138 user_Networking.xml
139
140 VBOX_SDKREF_XML_FILES = \
141 SDKRef.xml
142
143 # Wildcard the images path for every supported language
144 $(foreach f,$(VBOX_MANUAL_LANGUAGES), \
145 $(eval VBOX_MANUAL_PNG_FILES_$$(f) := $$(patsubst $$(VBOX_PATH_MANUAL_SRC)/$$(f)/%,%,$$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$$(f)/images/*.png))))
146
147 VBOX_MANUAL_TEX_UNICODE_FILES = \
148 $(wildcard $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/*)
149
150 VBOX_MANUAL_LATEX_FILES_TARGET = \
151 $(addprefix UserManual.,aux log out toc tex)
152
153 VBOX_SDKREF_LATEX_FILES_TARGET = \
154 $(addprefix SDKRef.,aux log out toc tex)
155
156 BLDDIRS += \
157 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,\
158 $(VBOX_MANUAL_LANGUAGES) \
159 $(addsuffix /images, $(VBOX_MANUAL_LANGUAGES)) \
160 $(addsuffix /html-single, $(VBOX_MANUAL_LANGUAGES)) \
161 $(addsuffix /html-chunks, $(VBOX_MANUAL_LANGUAGES)) \
162 $(addsuffix /HTMLHelp, $(VBOX_MANUAL_LANGUAGES)) \
163 $(addsuffix /HTMLHelp/images, $(VBOX_MANUAL_LANGUAGES)) \
164 )
165
166 ifdef VBOX_WITH_DOCS_CHM
167 VBOX_MANUAL_PACK += \
168 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf $(PATH_BIN)/VirtualBox_$(f).chm)
169 endif
170
171 OTHER_CLEAN += \
172 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_XML_FILES))) \
173 $(foreach f,en_US, $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_SDKREF_XML_FILES))) \
174 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_LATEX_FILES_TARGET))) \
175 $(foreach f,en_US, $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_SDKREF_LATEX_FILES_TARGET))) \
176 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, \
177 catalog docbook \
178 UserManual.fo) \
179 $(foreach f,$(VBOX_MANUAL_LANGUAGES), $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/, \
180 docbook-htmlhelp-formatcfg.xsl \
181 docbook-html-one-page-formatcfg.xsl \
182 docbook-html-chunks-formatcfg.xsl \
183 titlepage-htmlhelp.xsl )) \
184 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) \
185 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f)))) \
186 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf) \
187 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm) \
188 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf) \
189 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm) \
190 $(PATH_BIN)/UserManual.pdf \
191 $(PATH_BIN)/VirtualBox.chm \
192 $(foreach f,en_US,$(VBOX_PATH_MANUAL_OUTBASE)/$f/SDKRef.pdf) \
193 $(PATH_BIN)/sdk/docs/SDKRef.pdf \
194 $(wildcard $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/*.h*)) \
195 $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
196 $(patsubst $(VBOX_PATH_MANUAL_SRC)/texfiles/unicode/%,$(VBOX_PATH_MANUAL_OUTBASE)/$f/%, \
197 $(VBOX_MANUAL_TEX_UNICODE_FILES))) \
198 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
199
200endif # VBOX_WITH_DOCS
201
202
203
204##########################################################################################
205#
206# Options
207#
208##########################################################################################
209
210HTMLHELPOPTS =
211
212
213##########################################################################################
214#
215# Preparations
216#
217##########################################################################################
218
219# tool locations
220ifndef VBOX_OSE
221 # use docbook from our tools directory
222 DOCBOOKPATH ?= $(PATH_DEVTOOLS)/common/DocBook/v1.69.1
223 DOCBOOKDTDPATH ?= $(PATH_DEVTOOLS)/common/docbook-xml/v4.3
224 XML_CATALOG ?= $(VBOX_PATH_MANUAL_OUTBASE)/catalog
225 XML_CATALOG_DOCBOOK ?= $(VBOX_PATH_MANUAL_OUTBASE)/docbook
226else
227 # use docbook of the build host
228 DOCBOOKPATH ?= http://docbook.sourceforge.net/release/xsl/current/
229endif
230VBOXMANAGEPATH ?= $(PATH_BIN)/VBoxManage$(SUFF_EXE)
231
232ifeq ($(KBUILD_HOST),win)
233 # tell MiKTeX to automatically download packages
234 PDFLATEX = pdflatex -halt-on-error -interaction batchmode --enable-installer
235else
236 PDFLATEX_HALT = $(shell \
237 ( pdflatex -version | head -1 | grep 141592 > /dev/null ) && echo -halt-on-error )
238 PDFLATEX = pdflatex $(PDFLATEX_HALT) -interaction batchmode
239endif
240
241# Windows HTML Help Workshop compiler (stupid thing always returns an error!)
242HHC = -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe
243
244
245##########################################################################################
246#
247# Rules: Preprocess DocBook XML files
248# (preliminary step for both CHM and PDF generation)
249#
250##########################################################################################
251
252#
253# The following rules for $(VBOX_PATH_MANUAL_OUTBASE)/*.xml process the XML files
254# in doc/manual to allow for some magic variable replacements. The PDF and CHM
255# targets do not depend on the XML files in doc/manual, but those in
256# $(VBOX_PATH_MANUAL_OUTBASE) instead, which we copy there from here, after that magic
257# processing.
258#
259# So, before copying, the following steps are performed:
260#
261# -- $VBOX_VERSION_* strings are replaced with the actual current VBox version.
262# -- $VBOX_MANAGE_OUTPUT (in VBoxManage.xml) is replaced with the current
263# output of the actual VBoxManage program, to save us from having to
264# update the manual all the time.
265#
266
267# Only one changelog for all languages
268$(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG): $(VBOX_PATH_MANUAL_SRC)/$(VBOX_MANUAL_XML_CHANGELOG) | $$(dir $$@)
269 $(QUIET)$(INSTALL) -m 0644 $< $@
270
271# intermediate step to do some variable replacement in the document
272$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES)))): \
273 $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_VERSION_STAMP) | $$(dir $$@)
274 $(call MSG_L1,Pre-processing [1] $(@F) to $@)
275 $(QUIET)$(RM) -f $@ [email protected]
276 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
277 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
278 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
279 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
280 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
281 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
282 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
283 --output [email protected] $<
284 $(QUIET)$(MV) -f [email protected] $@
285
286$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_VBoxManage.xml): \
287 $(VBOX_PATH_MANUAL_OUTBASE)/% : \
288 $(VBOX_PATH_MANUAL_SRC)/% \
289 $(VBOXMANAGEPATH) | $$(dir $$@)
290 $(call MSG_L1,Pre-processing [2] $(@F) to $@)
291 $(QUIET)$(RM) -f $@ [email protected] [email protected]
292 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
293 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
294 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
295 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
296 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
297 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
298 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
299 --output [email protected] $<
300 $(QUIET)$(SED) -e '1,/\$$VBOX_MANAGE_OUTPUT/!d' \
301 -e 's/\$$VBOX_MANAGE_OUTPUT.*//' \
302 --output $@ [email protected]
303 $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
304 $(if $(eq $(KBUILD_TARGET),darwin), -E 'DYLD_FALLBACK_LIBRARY_PATH=$(dir $(LIB_RUNTIME))') \
305 -- \
306 $(VBOXMANAGEPATH) --dumpopts
307 $(QUIET)$(SED) -e 's/</\&lt;/g' -e 's/>/\&gt;/g' --append $@ [email protected]
308 $(QUIET)$(SED) -e '/\$$VBOX_MANAGE_OUTPUT/,$$!d' \
309 -e 's/.*\$$VBOX_MANAGE_OUTPUT//' --append $@ [email protected]
310 $(QUIET)$(RM) -f [email protected] [email protected]
311
312VBOX_MANUAL_APIREF_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef_apiref.xml
313VBOX_DOC_XIDL_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
314VBOX_DOC_XIDL_SRC_TMP = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
315
316$(VBOX_DOC_XIDL_SRC_TMP): $(VBOX_DOC_XIDL_SRC) $(MAKEFILE_CURRENT) | $$(dir $$@)
317 $(call MSG_L1,Generating $@)
318 $(QUIET)$(SED) -e 's|@a \+\(\w\+\)|<tt>\1</tt>|g' \
319 -e 's|@c \+\(\w\+\)|<tt>\1</tt>|g' \
320 --output $@ $<
321
322# generate SDKRef_apiref.xml as a docbook file excerpt that will be referenced from the SDKRef.xml.
323$(VBOX_MANUAL_APIREF_TMP): $(VBOX_DOC_XIDL_SRC_TMP) $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl
324 $(call MSG_L1,Generating $@)
325 $(QUIET)$(VBOX_XSLTPROC) --xinclude -o $@ $(VBOX_PATH_MANUAL_SRC)/xidl2docbook.xsl $(VBOX_DOC_XIDL_SRC_TMP)
326
327$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.xml: \
328 $(VBOX_PATH_MANUAL_SRC)/en_US/SDKRef.xml $(VBOX_MANUAL_APIREF_TMP) \
329 | $$(dir $$@)
330 $(call MSG_L1,Pre-processing [2] $(@F) to $@)
331 $(QUIET)$(RM) -f $@ [email protected]
332 $(QUIET)$(SED) -e 's/\$$VBOX_VERSION_MAJOR/$(VBOX_VERSION_MAJOR)/g' \
333 -e 's/\$$VBOX_VERSION_MINOR/$(VBOX_VERSION_MINOR)/g' \
334 -e 's/\$$VBOX_VERSION_BUILD/$(VBOX_VERSION_BUILD)/g' \
335 -e 's/\$$VBOX_VERSION_STRING/$(VBOX_VERSION_STRING)/g' \
336 -e 's/\$$VBOX_VENDOR/$(VBOX_VENDOR)/g' \
337 -e 's/\$$VBOX_PRODUCT/$(VBOX_PRODUCT)/g' \
338 -e 's/\$$VBOX_C_YEAR/$(VBOX_C_YEAR)/g' \
339 --output [email protected] $<
340 $(QUIET)$(SED) -e '1,/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/!d' \
341 -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' \
342 --output $@ [email protected]
343 $(QUIET)$(SED) -e 's/<?xml version=\"1.0\" encoding=\"utf-8\"?>//g' --append $@ $(VBOX_MANUAL_APIREF_TMP)
344 $(QUIET)$(SED) -e '/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->/,$$!d' \
345 -e 's/<!--\$$VIRTUALBOX_MAIN_API_REFERENCE-->//' --append $@ [email protected]
346# $(QUIET)$(MV) -f [email protected] $@
347
348
349##########################################################################################
350#
351# Rules: Create or preprocess files for xsltproc
352# (preliminary step for both CHM and PDF generation)
353#
354##########################################################################################
355
356# Create a catalog file for xsltproc that points to docbook catalog.
357ifneq ($(XML_CATALOG),)
358$(XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@)
359 $(call MSG_L1,Creating catalog $@)
360 $(QUIET)$(RM) -f [email protected] $@
361 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
362 $(QUIET)$(APPEND) [email protected] '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
363 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
364 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
365 $(QUIET)$(APPEND) [email protected] ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
366 $(QUIET)$(APPEND) [email protected] ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
367 $(QUIET)$(APPEND) [email protected] ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(XML_CATALOG_DOCBOOK)"/>'
368 $(QUIET)$(APPEND) [email protected] '</catalog>'
369 $(QUIET)$(MV) -f [email protected] $@
370
371# Create a docbook catalog file for xsltproc that points to the local docbook files.
372$(XML_CATALOG_DOCBOOK): $(MAKEFILE_CURRENT) | $$(dir $$@)
373 $(call MSG_L1,Creating catalog $@)
374 $(QUIET)$(RM) -f [email protected] $@
375 $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
376 $(QUIET)$(APPEND) [email protected] '<!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 $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
378 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbpoolx.mod"/>'
379 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/docbookx.dtd"/>'
380 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML V4.4//EN" uri="file:///$(DOCBOOKDTDPATH)/docbookx.dtd"/>'
381 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbcentx.mod"/>'
382 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbnotnx.mod"/>'
383 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbgenent.mod"/>'
384 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/dbhierx.mod"/>'
385 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="file:///$(DOCBOOKDTDPATH)/soextblx.dtd"/>'
386 $(QUIET)$(APPEND) [email protected] ' <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN" uri="file:///$(DOCBOOKDTDPATH)/calstblx.dtd"/>'
387 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
388 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
389 $(QUIET)$(APPEND) [email protected] ' <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
390 $(QUIET)$(APPEND) [email protected] ' <rewriteURI uriStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(DOCBOOKDTDPATH)"/>'
391 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsa.ent"/>'
392 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsb.ent"/>'
393 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsc.ent"/>'
394 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsn.ent"/>'
395 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amso.ent"/>'
396 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-amsr.ent"/>'
397 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-box.ent"/>'
398 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-cyr1.ent"/>'
399 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-cyr2.ent"/>'
400 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-dia.ent"/>'
401 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk1.ent"/>'
402 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk2.ent"/>'
403 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk3.ent"/>'
404 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-grk4.ent"/>'
405 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-lat1.ent"/>'
406 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-lat2.ent"/>'
407 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-num.ent"/>'
408 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-pub.ent"/>'
409 $(QUIET)$(APPEND) [email protected] ' <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="file:///$(DOCBOOKDTDPATH)/ent/iso-tech.ent"/>'
410 $(QUIET)$(APPEND) [email protected] '</catalog>'
411 $(QUIET)$(MV) -f [email protected] $@
412endif
413
414# intermediate step to do some variable replacement in the XSL configuration
415$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/docbook-htmlhelp-formatcfg.xsl): \
416 $(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
417 $(call MSG_L1,Pre-processing $(@F) to $@)
418 $(QUIET)$(RM) -f [email protected] $@
419 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
420 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
421 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
422 $(QUIET)$(MV) -f [email protected] $@
423
424# Prepare the XSL file for our title page, htmlhelp variant.
425$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/titlepage-htmlhelp.xsl): \
426 $(VBOX_PATH_MANUAL_SRC)/titlepage-htmlhelp.xml $(MAKEFILE_CURRENT) | $$(dir $$@)
427 $(call MSG_L1,xsltproc $<)
428 $(QUIET)$(RM) -f [email protected] $@
429 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o [email protected] $(DOCBOOKPATH)/template/titlepage.xsl $<
430 $(QUIET)$(MV) -f [email protected] $@
431
432
433##########################################################################################
434#
435# Shared rules for PDF generation
436#
437##########################################################################################
438
439ifndef VBOX_OSE
440# copy ucs.sty and related files
441$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/ucs.sty):
442 $(call MSG_L1,Copying unicode support for LaTeX)
443 $(QUIET)$(CP) $(VBOX_MANUAL_TEX_UNICODE_FILES) $(@D)
444endif
445
446# copy the PNG files.
447# Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
448define def_vbox_cp_images_pdf
449local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)
450$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
451 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
452 $$(call MSG_L1,Copying temporary $$< => $$@)
453 $$(QUIET)$$(CP) -f $$< $$@
454endef
455
456$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_pdf)))
457
458
459##########################################################################################
460#
461# UserManual.pdf
462#
463##########################################################################################
464
465## @todo INSTALLS target for this!
466$(PATH_BIN)/UserManual.pdf: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.pdf | $$(dir $$@)
467 $(QUIET)$(CP) $< $@
468 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
469
470$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/UserManual_$(f).pdf): \
471 $(PATH_BIN)/UserManual_%.pdf : $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf
472 $(QUIET)$(CP) $< $@
473 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
474
475$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf): \
476 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf : \
477 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex \
478 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/%/ucs.sty) \
479 $(foreach f,$(VBOX_MANUAL_LANGUAGES),\
480 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(VBOX_MANUAL_PNG_FILES_$(f)))) | $$(dir $$@)
481# PDF generation via Latex: generate the .tex file
482 $(call MSG_L1,pdflatex $< (three passes) -> $@)
483 $(QUIET)$(REDIRECT) -C $(@D) -- $(PDFLATEX) UserManual.tex
484 $(QUIET)$(REDIRECT) -C $(@D) -- $(PDFLATEX) UserManual.tex
485 $(QUIET)$(REDIRECT) -C $(@D) -- $(PDFLATEX) UserManual.tex
486 $(QUIET)$(REDIRECT) -C $(@D) -- $(PDFLATEX) UserManual.tex
487##@todo restore this when above has been converted to INSTALLS target. $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
488
489# generate temporary LaTeX source from processed XML
490$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.tex): \
491 $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex : \
492 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES)) \
493 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
494 $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
495 $(MAKEFILE_CURRENT)
496 $(call MSG_L1,Generating $@ from DocBook XML)
497 $(QUIET)$(RM) -f $(addprefix $(@D)/,$(VBOX_MANUAL_LATEX_FILES_TARGET))
498# generate TeX source from processed docbook and store it in UserManual.tex.tmp;
499# pass current language to xsltproc in TARGETLANG variable (extract it from the
500# current directory, should become "de_DE" or the like)
501 $(QUIET)$(VBOX_XSLTPROC) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG $(notdir $(@D)) -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
502# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
503# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
504 $(QUIET)$(SED) \
505 -e 's|^\\QUOTE{}|\\OQ{}|g' \
506 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
507 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
508 --output $@ [email protected]
509 $(QUIET)$(RM) -f [email protected]
510
511
512##########################################################################################
513#
514# SDKRef.pdf
515#
516##########################################################################################
517
518$(VBOX_PATH_SDK)/docs/SDKRef.pdf: \
519 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex \
520 $(if $(VBOX_OSE),,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ucs.sty) \
521 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) | $$(dir $$@)
522# PDF generation via Latex: generate the .tex file
523 $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/docs
524 $(call MSG_L1,pdflatex $< (three passes))
525 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
526 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
527 $(QUIET)$(REDIRECT) -C $(<D) -- $(PDFLATEX) SDKRef.tex
528 $(QUIET)$(CP) $(<D)/SDKRef.pdf $@
529 $(call MSG_L1,Fresh LaTeX-generated PDF is now at $@)
530
531# generate temporary LaTeX source from processed XML
532$(VBOX_PATH_MANUAL_OUTBASE)/en_US/SDKRef.tex: $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_SDKREF_XML_FILES)) $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $(MAKEFILE_CURRENT)
533 $(call MSG_L1,Generating $@ from DocBook XML)
534 $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
535# generate TeX source from processed docbook and store it in SDKRef.tex.tmp
536 $(QUIET)$(VBOX_XSLTPROC) $(XSLTPROC_VERBOSE) --xinclude --nonet --stringparam TARGETLANG en_US -o [email protected] $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $<
537# for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;
538# the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections
539 $(QUIET)$(SED) \
540 -e 's|^\\QUOTE{}|\\OQ{}|g' \
541 -e 's|\(\W\)\\QUOTE{}|\1\\OQ{}|g' \
542 -e 's|\(\w\)\\QUOTE{}|\1\\CQ{}|g' \
543 --output $@ [email protected]
544 $(QUIET)$(RM) -f [email protected]
545
546
547##########################################################################################
548#
549# VirtualBox.chm
550#
551##########################################################################################
552
553#
554# Main rule for the .chm file (target of OTHERS at the top):
555# We first generate a .hhp help source file from the preprocessed
556# DocBook XML files, as defined above, then feed that into the
557# Microsoft Help Compiler.
558#
559
560ifdef VBOX_WITH_DOCS_CHM
561$(PATH_BIN)/VirtualBox.chm: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
562 $(QUIET)$(CP) $< $@
563 $(call MSG_L1,Fresh CHM is now at $@)
564
565$(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_BIN)/VirtualBox_$(f).chm): \
566 $(PATH_BIN)/VirtualBox_%.chm : $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm
567 $(QUIET)$(CP) $< $@
568 $(call MSG_L1,Fresh CHM is now at $@)
569
570$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/VirtualBox.chm): \
571 $(VBOX_PATH_MANUAL_OUTBASE)/%/VirtualBox.chm: \
572 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp \
573 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/,$(VBOX_MANUAL_PNG_FILES_$(f))))
574 $(call MSG_L1,hhc $<,=> $@)
575 $(QUIET)$(RM) -f $@
576 $(QUIET)$(HHC) $(subst /,\\,$<)
577
578$(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/htmlhelp.hhp): \
579 $(VBOX_PATH_MANUAL_OUTBASE)/%/HTMLHelp/htmlhelp.hhp: \
580 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES)) \
581 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG) \
582 $(VBOX_PATH_MANUAL_OUTBASE)/%/docbook-htmlhelp-formatcfg.xsl \
583 $(VBOX_PATH_MANUAL_OUTBASE)/%/titlepage-htmlhelp.xsl \
584 $(XML_CATALOG) \
585 $(XML_CATALOG_DOCBOOK)
586 $(call MSG_L1,xsltproc $<,=> $@)
587 $(QUIET)$(RM) -f $@
588 $(QUIET)$(MKDIR) -p $(@D)
589 $(QUIET)$(if $(XML_CATALOG),XML_CATALOG_FILES=$(XML_CATALOG)) \
590 $(VBOX_XSLTPROC) --xinclude --nonet --output $(@D)/ \
591 --stringparam htmlhelp.chm \
592 $(subst /,\\,$(@D)/../VirtualBox.chm) \
593 $(HTMLHELPOPTS) $(@D)/../docbook-htmlhelp-formatcfg.xsl \
594 $<
595
596# copy the PNG files.
597# Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input.
598define def_vbox_cp_images_html
599local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/HTMLHelp
600$$(addprefix $$(out_dir)/,$(VBOX_MANUAL_PNG_FILES_$(lang))): \
601 $$(out_dir)/%: $(VBOX_PATH_MANUAL_SRC)/$(lang)/% | $$$$(dir $$$$@)
602 $$(call MSG_L1,Copying temporary $$< => $$@)
603 $$(QUIET)$$(CP) -f $$< $$@
604endef
605
606$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(eval $(def_vbox_cp_images_html)))
607
608# Packing the docs into a zip file
609$(PATH_BIN)/VBoxDocumentation.zip: $(VBOX_MANUAL_PACK)
610 $(call MSG_L1,Packing documentation $@)
611 $(QUIET)$(RM) -f $@
612 $(QUIET)$(REDIRECT) -C $(PATH_BIN) -- zip$(HOSTSUFF_EXE) -9 $@ $(notdir $^)
613endif # VBOX_WITH_DOCS_CHM
614
615##########################################################################################
616#
617# UserManual.html
618#
619##########################################################################################
620
621# intermediate step to do some variable replacement in the XSL configuration
622$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl: \
623 $(VBOX_PATH_MANUAL_SRC)/docbook-html-one-page-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
624 $(call MSG_L1,Pre-processing $(@F) to $@)
625 $(QUIET)$(RM) -f [email protected] $@
626 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
627 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
628 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
629 $(QUIET)$(MV) -f [email protected] $@
630
631$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl: \
632 $(VBOX_PATH_MANUAL_SRC)/docbook-html-chunks-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
633 $(call MSG_L1,Pre-processing $(@F) to $@)
634 $(QUIET)$(RM) -f [email protected] $@
635 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
636 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
637 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
638 $(QUIET)$(MV) -f [email protected] $@
639
640$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
641 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
642 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
643 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
644 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
645 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
646 $(call MSG_L1,xsltproc $<)
647 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet \
648 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
649 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-one-page-formatcfg.xsl \
650 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
651
652$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
653 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
654 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml \
655 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_XML_FILES)) \
656 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(VBOX_MANUAL_PNG_FILES_en_US)) \
657 $(VBOX_PATH_MANUAL_OUTBASE)/$(VBOX_MANUAL_XML_CHANGELOG)
658 $(call MSG_L1,xsltproc $<)
659 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet \
660 --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
661 --stringparam chunk.section.depth 0 \
662 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-html-chunks-formatcfg.xsl \
663 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.xml
664
665$(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
666 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
667 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
668 $(call MSG_L1,Packing documentation $@)
669 $(QUIET)$(RM) -f $@
670 $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- zip$(HOSTSUFF_EXE) \
671 -9 -r $@ html-single html-chunks $(VBOX_MANUAL_PNG_FILES_en_US)
672
673html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
674
675html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
676
677html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
678
679##########################################################################################
680#
681# ChangeLog.html
682#
683##########################################################################################
684
685# intermediate step to do some variable replacement in the XSL configuration
686$(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl: \
687 $(VBOX_PATH_MANUAL_SRC)/docbook-changelog-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
688 $(call MSG_L1,Pre-processing $(@F) to $@)
689 $(QUIET)$(RM) -f [email protected] $@
690 $(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(DOCBOOKPATH)|g' \
691 -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
692 -e 's|\$$TARGETPATH|$(@D)|g' --output [email protected] $<
693 $(QUIET)$(MV) -f [email protected] $@
694
695$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml: ChangeLog.xml
696 $(QUIET)$(CP) $< $@
697
698$(VBOX_PATH_MANUAL_OUTBASE)/user_ChangeLogImpl_1.xml: $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml
699 $(QUIET)$(RM) -f [email protected] $@
700 $(QUIET)$(SED) -e 's|para|simpara|g' \
701 --output [email protected] $<
702 $(QUIET)$(MV) -f [email protected] $@
703
704$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
705 $(VBOX_PATH_MANUAL_OUTBASE)/user_ChangeLogImpl_1.xml \
706 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl \
707 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml
708 $(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html \
709 $(@D)/docbook-changelog-formatcfg.xsl \
710 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.xml
711
712$(PATH_BIN)/ChangeLog.html: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html
713 $(QUIET)$(CP) $< $@
714 $(call MSG_L1,Fresh ChangeLog.html is now at $@)
715
716cl-html: $(PATH_BIN)/ChangeLog.html
717
718include $(KBUILD_PATH)/subfooter.kmk
719
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette