VirtualBox

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

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

OSE header fixes

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

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