VirtualBox

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

Last change on this file since 99845 was 99845, checked in by vboxsync, 13 months ago

bugref:10450: Justify Qt 5/6 unit choice in various project parts.

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

© 2023 Oracle
ContactPrivacy policyTerms of Use