VirtualBox

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

最後變更 在這個檔案從93928是 93814,由 vboxsync 提交於 3 年 前

VBoxManage: Fix "clean" for the documentation related files.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette