VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk@ 105897

Last change on this file since 105897 was 105890, checked in by vboxsync, 3 months ago

FE/VBoxManage: Resolved a @todo: Sorted build defines alphabetically for easier lookup [build fix].

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.9 KB
Line 
1# $Id: Makefile.kmk 105890 2024-08-28 16:20:22Z vboxsync $
2## @file
3# Sub-Makefile for VBoxManage (the CLI frontend).
4#
5
6#
7# Copyright (C) 2006-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31include $(PATH_ROOT)/doc/manual/Config.kmk
32
33
34# Common defines. Sort alphabetically!
35VBOX_COMMON_VBOXMANAGE_DEFS = \
36 $(if $(VBOX_WITH_AHCI), VBOX_WITH_AHCI) \
37 $(if $(VBOX_WITH_AUDIO_ALSA), VBOX_WITH_AUDIO_ALSA) \
38 $(if $(VBOX_WITH_AUDIO_OSS), VBOX_WITH_AUDIO_OSS) \
39 $(if $(VBOX_WITH_AUDIO_PULSE),VBOX_WITH_AUDIO_PULSE) \
40 $(if $(VBOX_WITH_AUDIO_RECORDING),VBOX_WITH_AUDIO_RECORDING) \
41 $(if $(VBOX_WITH_CLOUD_NET), VBOX_WITH_CLOUD_NET) \
42 $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST) \
43 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
44 $(if $(VBOX_WITH_FULL_VM_ENCRYPTION),VBOX_WITH_FULL_VM_ENCRYPTION) \
45 $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL) \
46 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \
47 $(if $(VBOX_WITH_HEADLESS), VBOX_WITH_HEADLESS) \
48 $(if $(VBOX_WITH_HGCM), VBOX_WITH_HGCM) \
49 $(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
50 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD) \
51 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL) \
52 $(if $(VBOX_WITH_MAIN_NLS),VBOX_WITH_MAIN_NLS) \
53 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE) \
54 $(if $(VBOX_WITH_NETFLT), VBOX_WITH_NETFLT) \
55 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH) \
56 $(if $(VBOX_WITH_RECORDING),VBOX_WITH_RECORDING) \
57 $(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
58 $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBOX_WITH_SHARED_CLIPBOARD) \
59 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS) \
60 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM) \
61 $(if $(VBOX_WITH_UPDATE_AGENT), VBOX_WITH_UPDATE_AGENT) \
62 $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER) \
63 $(if $(VBOX_WITH_VBOXSDL), VBOX_WITH_VBOXSDL) \
64 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \
65 $(if $(VBOX_WITH_VIRTIO_NET_1_0),VBOX_WITH_VIRTIO_NET_1_0) \
66 $(if $(VBOX_WITH_VMSVGA),VBOX_WITH_VMSVGA) \
67 $(if-expr defined(VBOX_WITH_VMNET) && "$(KBUILD_TARGET)"=="darwin",VBOX_WITH_VMNET,)
68
69
70ifndef VBOX_ONLY_DOCS
71 PROGRAMS += VBoxManage
72 VBoxManage_TEMPLATE = VBoxMainClientExe
73 VBoxManage_DEFS += $(VBOX_COMMON_VBOXMANAGE_DEFS)
74 VBoxManage_DEFS.win = _WIN32_WINNT=0x0500
75 VBoxManage_INCS = \
76 $(VBoxManage_0_OUTDIR) \
77 ../Common
78 VBoxManage_INTERMEDIATES = \
79 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h
80 VBoxManage_SOURCES = \
81 VBoxManage.cpp \
82 VBoxManageUtils.cpp \
83 VBoxInternalManage.cpp \
84 VBoxManageAppliance.cpp \
85 VBoxManageBandwidthControl.cpp \
86 VBoxManageControlVM.cpp \
87 VBoxManageDebugVM.cpp \
88 VBoxManageDHCPServer.cpp \
89 VBoxManageDisk.cpp \
90 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp) \
91 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrlListener.cpp) \
92 $(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \
93 VBoxManageHelp.cpp \
94 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp \
95 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp \
96 VBoxManageHostonly.cpp \
97 VBoxManageInfo.cpp \
98 VBoxManageList.cpp \
99 VBoxManageMetrics.cpp \
100 VBoxManageMisc.cpp \
101 VBoxManageModifyVM.cpp \
102 VBoxManageModifyNvram.cpp \
103 VBoxManageSnapshot.cpp \
104 VBoxManageStorageController.cpp \
105 $(if $(VBOX_WITH_UPDATE_AGENT),VBoxManageUpdateCheck.cpp) \
106 VBoxManageUSB.cpp \
107 $(if $(VBOX_WITH_NAT_SERVICE),VBoxManageNATNetwork.cpp,) \
108 $(if $(VBOX_WITH_NAT_SERVICE),../../NetworkServices/NetLib/VBoxNetPortForwardString.cpp,) \
109 VBoxManageCloud.cpp \
110 VBoxManageCloudMachine.cpp \
111 ../Common/PasswordInput.cpp
112 VBoxManage_SOURCES.win = \
113 VBoxManage.rc
114 VBoxManage_LIBS += $(LIB_DDU)
115
116 ifdef VBOX_WITH_VBOXMANAGE_NLS
117 VBOX_PATH_VBOXMANAGE_SRC := $(PATH_SUB_CURRENT)
118 include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
119
120 VBoxManage_DEFS += VBOX_WITH_VBOXMANAGE_NLS
121 VBoxManage_INCS += \
122 $(PATH_ROOT)/src/VBox/Main/include
123 VBoxManage_SOURCES += \
124 $(PATH_ROOT)/src/VBox/Main/src-all/VirtualBoxTranslator.cpp \
125 $(PATH_ROOT)/src/VBox/Main/src-all/QMTranslatorImpl.cpp \
126 $(PATH_ROOT)/src/VBox/Main/src-all/GlobalStatusConversion.cpp
127
128 # $(addsuffix /VBoxManageBuiltInHelp.cpp,$(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES)))
129 #VBoxManage_INTERMEDIATES += \
130 # $(addsuffix /VBoxManageBuiltInHelp.h,$(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES)))
131
132 # define qt6 tools for translation
133 USES += qt6
134
135 PROGRAMS += VBoxManageNls
136 VBoxManageNls_TEMPLATE = VBoxNLS
137 VBoxManageNls_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_,$(VBOX_APPROVED_VBOXMANAGE_LANGUAGES)))
138 VBoxManageNls_VBOX_ALL_NLS_SOURCES = $(wildcard \
139 $(VBOX_PATH_VBOXMANAGE_SRC)/*.h \
140 $(VBOX_PATH_VBOXMANAGE_SRC)/*.cpp )
141
142 updatenls:: makeallnls $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts
143
144 makeallnls:: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
145 $(call MSG_L1,lupdate all languages (nls/*.ts))
146 $(QUIET)$(TOOL_QT6_LUPDATE) \
147 $^ \
148 -ts \
149 $(filter-out nls/VBoxManageNls_en.ts, $(VBoxManageNls_QT_TRANSLATIONS)) \
150 $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_xx_YY.ts
151
152 # fake-main-nls:
153 # $(foreach file, $(VBoxManageNls_QT_TRANSLATIONS) \
154 # ,$(NLTAB)$(SED) -i \
155 # -e '/<source>.*<\/source>/h' \
156 # -e '/<source>.*<\/source>/p' \
157 # -e '/<translation type="unfinished"><\/translation>/{' \
158 # -e 'x' \
159 # -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
160 # -e '}' \
161 # $(file) )
162
163
164 # Create the English translation file. This is something special cause it will
165 # contain the plural forms only.
166 $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
167 $(call MSG_L1,lupdate $@)
168 $(QUIET)$(TOOL_QT6_LUPDATE) \
169 $^ \
170 -ts \
171 "$@"
172 $(QUIET)$(SED) -n -i \
173 -e '/<context>/,/<\/context>/!p' \
174 -e '/<context>/h' \
175 -e '/<name>/H' \
176 -e '/<message numerus="yes">/,/<\/message>/H' \
177 -e '/<\/context>/{H;x;/<message/p}' \
178 "$@"
179
180 endif # VBOX_WITH_VBOXMANAGE_NLS
181
182
183 # VBoxNetPortForwardString.h
184 VBoxManageNATNetwork.cpp_INCS += ../../NetworkServices/NetLib/
185
186endif # VBOX_ONLY_DOCS
187
188ifneq ($(KBUILD_TARGET),win)
189 # Workaround for buggy gcc-4.3 compilers, see
190 #
191 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36474
192 #
193 # Some later revisions of version 4.3.1 are known to work so we assume
194 # that version 4.3.2 or later has this bug definitely fixed.
195 VBoxManage_CXXFLAGS.release += \
196 $(if $(VBOX_GCC_VERSION_CXX),$(if-expr $(VBOX_GCC_VERSION_CXX) < 40300 || $(VBOX_GCC_VERSION_CXX) > 40301,,--param max-fields-for-field-sensitive=0),)
197 VBoxManageHelp_CXXFLAGS.release = $(VBoxManage_CXXFLAGS.release)
198endif
199
200
201#
202# VBoxManage built-in help from XML refentry in doc/manual/en_US/.
203#
204$(call KB_FN_DO_PASS0_ON_TARGET,VBoxManage)
205
206VBoxManage_CLEAN += \
207 $(VBOX_XML_CATALOG) \
208 $(VBOX_XML_CATALOG_DOCBOOK) \
209 $(VBOX_XML_CATALOG_MANUAL) \
210 $(VBOX_XML_ENTITIES) \
211 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, $(VBOX_XML_XREF_TO_TEXT) $(VBOX_XML_XREF_TO_TEXT).cat) \
212 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp \
213 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp.ts \
214 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp \
215 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
216 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h \
217 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
218 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)))
219
220# Preprocess the xml files, applying remarks.
221$(foreach file,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
222, $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(VBoxManage_0_OUTDIR),$(file), \
223 $(VBOX_PATH_MANUAL_SRC)/en_US/$(file),replace-xrefs,en_US))
224
225
226##
227# Emits rules for generating cpp files from man pages.
228#
229# $(evalcall2 def_vbox_man_generate_cpp_help)
230# @param 1 Folder with preprocessed man_VBoxManage_* files
231# @param 2 language code.
232define def_vbox_man_generate_cpp_help
233 ifneq ($(2),en_US)
234 VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2) = $(VBOX_PATH_MANUAL_SRC)/$(2)/docbook-refentry-to-C-help.xsl
235 else
236 VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2) = $(VBOX_DOCBOOK_REFENTRY_TO_C_HELP)
237 endif
238 $$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(2).cpp.ts \
239 +| $$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(2).cpp: \
240 $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2)) \
241 $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP) \
242 $$(addprefix $(1)/,$$(filter man_VBoxManage-%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
243 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(MAKEFILE) | $$$$(dir $$$$@)
244 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(filter %.xml,$$^),$$(patsubst %.ts,%,$$@))
245 $$(QUIET)$$(APPEND) -tn "$$@" \
246 '/* Autogenerated by $$<, do not edit! */' \
247 '' \
248 '#include "VBoxManageBuiltInHelp.h"' \
249 '' \
250 'RT_C_DECLS_BEGIN' \
251 '/* make next variables visible outside the module */' \
252 'extern PCRTMSGREFENTRY g_apHelpEntries_$(2)[];' \
253 'extern const uint32_t g_cHelpEntries_$(2);' \
254 'RT_C_DECLS_END' \
255 '' \
256 $$(foreach refentry,$$(filter %.xml,$$^) \
257 ,$$(NLTAB)$$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$$@") \
258 --path '$(VBOX_PATH_MANUAL_SRC)/$(2) $(VBOX_PATH_MANUAL_SRC)/en_US' $$< $$(refentry))
259 $$(QUIET)$$(APPEND) -n "$$@" \
260 '' \
261 'PCRTMSGREFENTRY g_apHelpEntries_$(2)[] =' \
262 '{'
263 $$(foreach refentry,$$(filter %.xml,$$^) \
264 ,$$(NLTAB)$$(QUIET)$$(APPEND) -n "$$@" \
265 ' &g_$$(subst -,_,$$(tolower $$(patsubst man_%,%,$$(notdir $$(basename $$(refentry)))))),')
266 $$(QUIET)$$(APPEND) -n "$$@" \
267 '};' \
268 '' \
269 'const uint32_t g_cHelpEntries_$(2) = RT_ELEMENTS(g_apHelpEntries_$(2));' \
270 ''
271 $$(QUIET)$$(CP) --changed -- "$$@" "$$(patsubst %.ts,%,$$@)"
272endef
273# The above APPEND stuff trigger some kind of problem on some boxes when not split up...
274# update: Fixed in SVN (strcpy -> memmove in new_job(), job.c - r2591). Just need to rebuild all platforms.
275
276# Generate the .cpp file.
277$(evalcall2 def_vbox_man_generate_cpp_help, $(VBoxManage_0_OUTDIR),en_US)
278
279
280# Generate built-in help for all languages (English is implicit).
281$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
282+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp: \
283 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp \
284 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES), $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(lang).cpp ) \
285 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h
286 $(QUIET)$(APPEND) -tn "$@" \
287 '/* Autogenerated, do not edit! */' \
288 '' \
289 '#include "VBoxManageBuiltInHelp.h"' \
290 '' \
291 'RT_C_DECLS_BEGIN' \
292 '' \
293 'extern PCRTMSGREFENTRY g_apHelpEntries_en_US[];' \
294 'extern const uint32_t g_cHelpEntries_en_US;'
295ifdef VBOX_WITH_VBOXMANAGE_NLS
296 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
297 ,$(NLTAB)$(QUIET)$(APPEND) -n "$@" \
298 '' \
299 'extern PCRTMSGREFENTRY g_apHelpEntries_$(lang)[];' \
300 'extern const uint32_t g_cHelpEntries_$(lang);')
301endif
302 $(QUIET)$(APPEND) -n "$@" \
303 '' \
304 'RT_C_DECLS_END' \
305 '' \
306 'HELP_LANG_ENTRY_T const g_aHelpLangEntries[] = ' \
307 '{' \
308 ' { "en_US", 5, &g_apHelpEntries_en_US[0], &g_cHelpEntries_en_US },'
309ifdef VBOX_WITH_VBOXMANAGE_NLS
310 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
311 ,$(NLTAB)$(QUIET)$(APPEND) "$@" ' { "$(lang)", $(length $(lang)), &g_apHelpEntries_$(lang)[0], &g_cHelpEntries_$(lang) },' )
312endif
313 $(QUIET)$(APPEND) -n "$@" \
314 '};' \
315 '' \
316 'uint32_t const g_cHelpLangEntries = RT_ELEMENTS(g_aHelpLangEntries);' \
317 '' \
318 'PCHELP_LANG_ENTRY_T volatile g_pHelpLangEntry = &g_aHelpLangEntries[0];'\
319 ''
320 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
321
322
323$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
324+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h: \
325 $(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) \
326 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
327 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
328 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
329 $(QUIET)$(APPEND) -tn "$@" \
330 '/* Autogenerated by $<, do not edit! */' \
331 '' \
332 '#ifndef ___VBoxManageBuiltInHelp_h___' \
333 '#define ___VBoxManageBuiltInHelp_h___' \
334 '' \
335 '#include <iprt/message.h>' \
336 '#include <iprt/assertcompile.h>' \
337 '' \
338 'RT_C_DECLS_BEGIN' \
339 '' \
340 'typedef enum HELP_CMD_VBOXMANAGE' \
341 '{' \
342 ' HELP_CMD_VBOXMANAGE_INVALID = 0,'
343 $(foreach refentry,$(filter %.xml,$^) \
344 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
345 --stringparam 'g_sMode' 'cmd' $< $(refentry))
346 $(QUIET)$(APPEND) -n "$@" \
347 ' HELP_CMD_VBOXMANAGE_END' \
348 '} HELP_CMD_VBOXMANAGE;'
349 $(foreach refentry,$(filter %.xml,$^) \
350 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
351 --stringparam 'g_sMode' 'subcmd' $< $(refentry))
352 $(QUIET)$(APPEND) -n "$@" \
353 '' \
354 'typedef struct HELP_LANG_ENTRY_T' \
355 '{' \
356 ' const char *pszLang;' \
357 ' size_t cchLang;' \
358 ' PCRTMSGREFENTRY *papHelpEntries;' \
359 ' uint32_t const *pcHelpEntries;' \
360 '} HELP_LANG_ENTRY_T;' \
361 'typedef HELP_LANG_ENTRY_T const *PCHELP_LANG_ENTRY_T;' \
362 '' \
363 'extern HELP_LANG_ENTRY_T const g_aHelpLangEntries[];' \
364 'extern const uint32_t g_cHelpLangEntries;' \
365 '' \
366 'extern PCHELP_LANG_ENTRY_T volatile g_pHelpLangEntry;' \
367 '' \
368 'RT_C_DECLS_END' \
369 '' \
370 '#endif' \
371 ''
372 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
373
374ifdef VBOX_WITH_VBOXMANAGE_NLS
375 VBoxManage_BLDDIRS += \
376 $(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))
377
378 VBoxManage_SOURCES += \
379 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
380 , $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(lang).cpp)
381
382 VBoxManage_CLEAN += \
383 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES), \
384 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
385 $(VBOX_XML_XREF_TO_TEXT) \
386 $(VBOX_XML_XREF_TO_TEXT).cat \
387 )) \
388 $(addsuffix .cpp,$(addprefix $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))) \
389 $(addsuffix .cpp.ts,$(addprefix $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))) \
390 $(foreach file, $(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
391 , $(addsuffix /$(file),$(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))))
392
393 # Preprocess the xml files, applying remarks.
394 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
395 , $(foreach file,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
396 , $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(VBoxManage_0_OUTDIR)/$(lang),$(file) \
397 ,$(VBOX_PATH_MANUAL_SRC)/$(lang)/$(file),replace-xrefs \
398 ,$(if $(filter $(lang),$(VBOX_MANUAL_LANGUAGES)),$(lang),en_US))))
399
400 # Generate the .cpp file.
401 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
402 , $(evalcall2 def_vbox_man_generate_cpp_help,$(VBoxManage_0_OUTDIR)/$(lang),$(lang)))
403
404 # Ensure $(lang) subfolder in the $(VBOX_PATH_MANUAL_OUTBASE) is created (for section names file)
405 BLDDIRS += $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))
406
407 # Generate sections names file for $(lang)
408 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
409 , $(evalcall2 def_vbox_xref_to_text,$(lang)))
410
411endif
412
413include $(FILE_KBUILD_SUB_FOOTER)
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