VirtualBox

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

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

doc/manual: start of French translation, contributed by Jean-Philippe Mengual

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