VirtualBox

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

Last change on this file since 105402 was 103621, checked in by vboxsync, 9 months ago

VBoxManage: Re-enable ru_RU translation (falling back to en_US xref strings). bugref:10302

  • 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 103621 2024-02-29 20:52:55Z 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 qt6 tools for translation
134 USES += qt6
135
136 PROGRAMS += VBoxManageNls
137 VBoxManageNls_TEMPLATE = VBoxNLS
138 VBoxManageNls_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_,$(VBOX_APPROVED_VBOXMANAGE_LANGUAGES)))
139 VBoxManageNls_VBOX_ALL_NLS_SOURCES = $(wildcard \
140 $(VBOX_PATH_VBOXMANAGE_SRC)/*.h \
141 $(VBOX_PATH_VBOXMANAGE_SRC)/*.cpp )
142
143 updatenls:: makeallnls $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts
144
145 makeallnls:: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
146 $(call MSG_L1,lupdate all languages (nls/*.ts))
147 $(QUIET)$(TOOL_QT5_LUPDATE) \
148 $^ \
149 -ts \
150 $(filter-out nls/VBoxManageNls_en.ts, $(VBoxManageNls_QT_TRANSLATIONS)) \
151 $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_xx_YY.ts
152
153 # fake-main-nls:
154 # $(foreach file, $(VBoxManageNls_QT_TRANSLATIONS) \
155 # ,$(NLTAB)$(SED) -i \
156 # -e '/<source>.*<\/source>/h' \
157 # -e '/<source>.*<\/source>/p' \
158 # -e '/<translation type="unfinished"><\/translation>/{' \
159 # -e 'x' \
160 # -e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
161 # -e '}' \
162 # $(file) )
163
164
165 # Create the English translation file. This is something special cause it will
166 # contain the plural forms only.
167 $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
168 $(call MSG_L1,lupdate $@)
169 $(QUIET)$(TOOL_QT5_LUPDATE) \
170 $^ \
171 -ts \
172 "$@"
173 $(QUIET)$(SED) -n -i \
174 -e '/<context>/,/<\/context>/!p' \
175 -e '/<context>/h' \
176 -e '/<name>/H' \
177 -e '/<message numerus="yes">/,/<\/message>/H' \
178 -e '/<\/context>/{H;x;/<message/p}' \
179 "$@"
180
181 endif # VBOX_WITH_VBOXMANAGE_NLS
182
183
184 # VBoxNetPortForwardString.h
185 VBoxManageNATNetwork.cpp_INCS += ../../NetworkServices/NetLib/
186
187endif # VBOX_ONLY_DOCS
188
189ifneq ($(KBUILD_TARGET),win)
190 # Workaround for buggy gcc-4.3 compilers, see
191 #
192 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36474
193 #
194 # Some later revisions of version 4.3.1 are known to work so we assume
195 # that version 4.3.2 or later has this bug definitely fixed.
196 VBoxManage_CXXFLAGS.release += \
197 $(if $(VBOX_GCC_VERSION_CXX),$(if-expr $(VBOX_GCC_VERSION_CXX) < 40300 || $(VBOX_GCC_VERSION_CXX) > 40301,,--param max-fields-for-field-sensitive=0),)
198 VBoxManageHelp_CXXFLAGS.release = $(VBoxManage_CXXFLAGS.release)
199endif
200
201
202#
203# VBoxManage built-in help from XML refentry in doc/manual/en_US/.
204#
205$(call KB_FN_DO_PASS0_ON_TARGET,VBoxManage)
206
207VBoxManage_CLEAN += \
208 $(VBOX_XML_CATALOG) \
209 $(VBOX_XML_CATALOG_DOCBOOK) \
210 $(VBOX_XML_CATALOG_MANUAL) \
211 $(VBOX_XML_ENTITIES) \
212 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/, $(VBOX_XML_XREF_TO_TEXT) $(VBOX_XML_XREF_TO_TEXT).cat) \
213 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp \
214 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp.ts \
215 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp \
216 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
217 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h \
218 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
219 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)))
220
221# Preprocess the xml files, applying remarks.
222$(foreach file,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
223, $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(VBoxManage_0_OUTDIR),$(file), \
224 $(VBOX_PATH_MANUAL_SRC)/en_US/$(file),replace-xrefs,en_US))
225
226
227##
228# Emits rules for generating cpp files from man pages.
229#
230# $(evalcall2 def_vbox_man_generate_cpp_help)
231# @param 1 Folder with preprocessed man_VBoxManage_* files
232# @param 2 language code.
233define def_vbox_man_generate_cpp_help
234 ifneq ($(2),en_US)
235 VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2) = $(VBOX_PATH_MANUAL_SRC)/$(2)/docbook-refentry-to-C-help.xsl
236 else
237 VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2) = $(VBOX_DOCBOOK_REFENTRY_TO_C_HELP)
238 endif
239 $$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(2).cpp.ts \
240 +| $$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(2).cpp: \
241 $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP_$(2)) \
242 $$(VBOX_DOCBOOK_REFENTRY_TO_C_HELP) \
243 $$(addprefix $(1)/,$$(filter man_VBoxManage-%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
244 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(MAKEFILE) | $$$$(dir $$$$@)
245 $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(filter %.xml,$$^),$$(patsubst %.ts,%,$$@))
246 $$(QUIET)$$(APPEND) -tn "$$@" \
247 '/* Autogenerated by $$<, do not edit! */' \
248 '' \
249 '#include "VBoxManageBuiltInHelp.h"' \
250 '' \
251 'RT_C_DECLS_BEGIN' \
252 '/* make next variables visible outside the module */' \
253 'extern PCRTMSGREFENTRY g_apHelpEntries_$(2)[];' \
254 'extern const uint32_t g_cHelpEntries_$(2);' \
255 'RT_C_DECLS_END' \
256 '' \
257 $$(foreach refentry,$$(filter %.xml,$$^) \
258 ,$$(NLTAB)$$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$$@") \
259 --path '$(VBOX_PATH_MANUAL_SRC)/$(2) $(VBOX_PATH_MANUAL_SRC)/en_US' $$< $$(refentry))
260 $$(QUIET)$$(APPEND) -n "$$@" \
261 '' \
262 'PCRTMSGREFENTRY g_apHelpEntries_$(2)[] =' \
263 '{'
264 $$(foreach refentry,$$(filter %.xml,$$^) \
265 ,$$(NLTAB)$$(QUIET)$$(APPEND) -n "$$@" \
266 ' &g_$$(subst -,_,$$(tolower $$(patsubst man_%,%,$$(notdir $$(basename $$(refentry)))))),')
267 $$(QUIET)$$(APPEND) -n "$$@" \
268 '};' \
269 '' \
270 'const uint32_t g_cHelpEntries_$(2) = RT_ELEMENTS(g_apHelpEntries_$(2));' \
271 ''
272 $$(QUIET)$$(CP) --changed -- "$$@" "$$(patsubst %.ts,%,$$@)"
273endef
274# The above APPEND stuff trigger some kind of problem on some boxes when not split up...
275# update: Fixed in SVN (strcpy -> memmove in new_job(), job.c - r2591). Just need to rebuild all platforms.
276
277# Generate the .cpp file.
278$(evalcall2 def_vbox_man_generate_cpp_help, $(VBoxManage_0_OUTDIR),en_US)
279
280
281# Generate built-in help for all languages (English is implicit).
282$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp.ts \
283+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.cpp: \
284 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_en_US.cpp \
285 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES), $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(lang).cpp ) \
286 $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h
287 $(QUIET)$(APPEND) -tn "$@" \
288 '/* Autogenerated, do not edit! */' \
289 '' \
290 '#include "VBoxManageBuiltInHelp.h"' \
291 '' \
292 'RT_C_DECLS_BEGIN' \
293 '' \
294 'extern PCRTMSGREFENTRY g_apHelpEntries_en_US[];' \
295 'extern const uint32_t g_cHelpEntries_en_US;'
296ifdef VBOX_WITH_VBOXMANAGE_NLS
297 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
298 ,$(NLTAB)$(QUIET)$(APPEND) -n "$@" \
299 '' \
300 'extern PCRTMSGREFENTRY g_apHelpEntries_$(lang)[];' \
301 'extern const uint32_t g_cHelpEntries_$(lang);')
302endif
303 $(QUIET)$(APPEND) -n "$@" \
304 '' \
305 'RT_C_DECLS_END' \
306 '' \
307 'HELP_LANG_ENTRY_T const g_aHelpLangEntries[] = ' \
308 '{' \
309 ' { "en_US", 5, &g_apHelpEntries_en_US[0], &g_cHelpEntries_en_US },'
310ifdef VBOX_WITH_VBOXMANAGE_NLS
311 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
312 ,$(NLTAB)$(QUIET)$(APPEND) "$@" ' { "$(lang)", $(length $(lang)), &g_apHelpEntries_$(lang)[0], &g_cHelpEntries_$(lang) },' )
313endif
314 $(QUIET)$(APPEND) -n "$@" \
315 '};' \
316 '' \
317 'uint32_t const g_cHelpLangEntries = RT_ELEMENTS(g_aHelpLangEntries);' \
318 '' \
319 'PCHELP_LANG_ENTRY_T volatile g_pHelpLangEntry = &g_aHelpLangEntries[0];'\
320 ''
321 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
322
323
324$(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h.ts \
325+| $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp.h: \
326 $(VBOX_DOCBOOK_REFENTRY_TO_H_HELP) \
327 $(addprefix $(VBoxManage_0_OUTDIR)/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
328 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
329 $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
330 $(QUIET)$(APPEND) -tn "$@" \
331 '/* Autogenerated by $<, do not edit! */' \
332 '' \
333 '#ifndef ___VBoxManageBuiltInHelp_h___' \
334 '#define ___VBoxManageBuiltInHelp_h___' \
335 '' \
336 '#include <iprt/message.h>' \
337 '#include <iprt/assertcompile.h>' \
338 '' \
339 'RT_C_DECLS_BEGIN' \
340 '' \
341 'typedef enum HELP_CMD_VBOXMANAGE' \
342 '{' \
343 ' HELP_CMD_VBOXMANAGE_INVALID = 0,'
344 $(foreach refentry,$(filter %.xml,$^) \
345 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
346 --stringparam 'g_sMode' 'cmd' $< $(refentry))
347 $(QUIET)$(APPEND) -n "$@" \
348 ' HELP_CMD_VBOXMANAGE_END' \
349 '} HELP_CMD_VBOXMANAGE;'
350 $(foreach refentry,$(filter %.xml,$^) \
351 ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
352 --stringparam 'g_sMode' 'subcmd' $< $(refentry))
353 $(QUIET)$(APPEND) -n "$@" \
354 '' \
355 'typedef struct HELP_LANG_ENTRY_T' \
356 '{' \
357 ' const char *pszLang;' \
358 ' size_t cchLang;' \
359 ' PCRTMSGREFENTRY *papHelpEntries;' \
360 ' uint32_t const *pcHelpEntries;' \
361 '} HELP_LANG_ENTRY_T;' \
362 'typedef HELP_LANG_ENTRY_T const *PCHELP_LANG_ENTRY_T;' \
363 '' \
364 'extern HELP_LANG_ENTRY_T const g_aHelpLangEntries[];' \
365 'extern const uint32_t g_cHelpLangEntries;' \
366 '' \
367 'extern PCHELP_LANG_ENTRY_T volatile g_pHelpLangEntry;' \
368 '' \
369 'RT_C_DECLS_END' \
370 '' \
371 '#endif' \
372 ''
373 $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
374
375ifdef VBOX_WITH_VBOXMANAGE_NLS
376 VBoxManage_BLDDIRS += \
377 $(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))
378
379 VBoxManage_SOURCES += \
380 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
381 , $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_$(lang).cpp)
382
383 VBoxManage_CLEAN += \
384 $(foreach lang,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES), \
385 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/, \
386 $(VBOX_XML_XREF_TO_TEXT) \
387 $(VBOX_XML_XREF_TO_TEXT).cat \
388 )) \
389 $(addsuffix .cpp,$(addprefix $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))) \
390 $(addsuffix .cpp.ts,$(addprefix $(VBoxManage_0_OUTDIR)/VBoxManageBuiltInHelp_,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))) \
391 $(foreach file, $(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
392 , $(addsuffix /$(file),$(addprefix $(VBoxManage_0_OUTDIR)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))))
393
394 # Preprocess the xml files, applying remarks.
395 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
396 , $(foreach file,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
397 , $(evalcall2 def_vbox_refentry_preprocess_for_manpage,$(VBoxManage_0_OUTDIR)/$(lang),$(file) \
398 ,$(VBOX_PATH_MANUAL_SRC)/$(lang)/$(file),replace-xrefs \
399 ,$(if $(filter $(lang),$(VBOX_MANUAL_LANGUAGES)),$(lang),en_US))))
400
401 # Generate the .cpp file.
402 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
403 , $(evalcall2 def_vbox_man_generate_cpp_help,$(VBoxManage_0_OUTDIR)/$(lang),$(lang)))
404
405 # Ensure $(lang) subfolder in the $(VBOX_PATH_MANUAL_OUTBASE) is created (for section names file)
406 BLDDIRS += $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/,$(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES))
407
408 # Generate sections names file for $(lang)
409 $(foreach lang, $(VBOX_APPROVED_VBOXMANAGE_DOCBOOK_LANGUAGES) \
410 , $(evalcall2 def_vbox_xref_to_text,$(lang)))
411
412endif
413
414include $(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