VirtualBox

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

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

doc: repair kmk cl-html which was broken by the xinclude changes some months ago in r68612 and earlier

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