VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/Makefile.kmk@ 31768

最後變更 在這個檔案從31768是 31768,由 vboxsync 提交於 15 年 前

Linux installer: allow to start the web service via script, further work required

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 14.5 KB
 
1# $Id: Makefile.kmk 31768 2010-08-18 16:28:05Z vboxsync $
2## @file
3# Makefile for the Linux installer.
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.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
21ifneq ($(KBUILD_HOST),linux)
22 $(error "The Linux installer can only be built on Linux!")
23endif
24
25#
26# Globals and targets.
27#
28VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT)
29VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux
30VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install
31VBOX_LNX_DBG_PATH := usr/lib/debug/opt/VirtualBox
32VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
33
34# Unset this to speed up things during makefile hacking.
35VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
36
37BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR)
38PACKING += $(PATH_BIN)/VirtualBox.tar.bz2
39if !defined(VBOX_NO_LINUX_RUN_INSTALLER)
40 PACKING += $(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME) \
41 $(PATH_BIN)/VirtualBox-dbg.tar.bz2
42endif
43
44OTHER_CLEAN += \
45 $(addprefix $(VBOX_LNX_INST_STAGE_DIR)/,\
46 install.sh \
47 uninstall.sh \
48 deffiles \
49 routines.sh \
50 vboxdrv.sh \
51 vboxweb-service.sh \
52 VirtualBox.tar.bz2 \
53 LICENSE) \
54 $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \
55 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/,\
56 vboxdrv.sh \
57 vboxweb-service.sh \
58 install.sh)
59
60#
61# Linux installs.
62#
63INSTALLS += linux-bin
64linux-bin_INST = bin/
65linux-bin_MODE = a+rx,u+w
66linux-bin_SOURCES = \
67 VBoxSysInfo.sh \
68 VBox.sh=>VBox.sh \
69 $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
70
71INSTALLS += linux-misc
72linux-misc_INST = bin/
73linux-misc_MODE = a+r,u+w
74linux-misc_SOURCES = \
75 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
76 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
77 $(if $(VBOX_WITH_QTGUI),$(PATH_linux-misc)/virtualbox.desktop,)
78linux-misc_CLEAN = $(PATH_linux-misc)/virtualbox.desktop
79
80$$(PATH_linux-misc)/virtualbox.desktop: $(PATH_SUB_CURRENT)/virtualbox.desktop $(VBOX_VERSION_STAMP) | $$(dir $$@)
81 $(call MSG_GENERATE,,$@,$<)
82ifdef VBOX_PATH_PACKAGE_DOCS
83 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" --output $@ $<
84else
85 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox+" --output $@ $<
86endif
87
88
89
90#
91# The files residing in bin/ that we'll ship.
92#
93
94# Strip these binaries
95VBOX_LNX_STRIP_BIN = \
96 VBoxDD.so \
97 VBoxDD2.so \
98 VBoxREM.so \
99 VBoxDDU.so \
100 VBoxVMM.so \
101 $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,) \
102 $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,) \
103 VBoxRT.so \
104 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
105 $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
106 $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
107 $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
108 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
109 $(if $(VBOX_WITH_MAIN), \
110 VBoxManage \
111 VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
112 VBoxNetAdpCtl \
113 VBoxSVC \
114 VBoxXPCOM.so \
115 VBoxXPCOMC.so \
116 VBoxXPCOMIPCD \
117 components/VBoxXPCOMIPCC.so \
118 components/VBoxSVCM.so \
119 components/VBoxC.so,) \
120 $(if $(VBOX_WITH_CROGL),\
121 VBoxOGLhostcrutil.so \
122 VBoxOGLhosterrorspu.so \
123 VBoxOGLrenderspu.so \
124 VBoxTestOGL \
125 VBoxSharedCrOpenGL.so,) \
126 $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_BIN)/VBoxPython*.so)),) \
127 $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \
128 VBoxTunctl
129
130# Do not remove relocation information of these binaries
131VBOX_LNX_STRIP_OBJ = \
132 VBoxDD2GC.gc \
133 VBoxDD2R0.r0 \
134 VBoxDDGC.gc \
135 VBoxDDR0.r0 \
136 VMMGC.gc \
137 VMMR0.r0
138
139# Do not strip anything of these files
140VBOX_LNX_NO_STRIP = \
141 $(if $(VBOX_OSE),,LICENSE) \
142 $(if $(VBOX_WITH_MAIN), \
143 components/VBoxXPCOMBase.xpt \
144 components/VirtualBox_XPCOM.xpt) \
145 $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
146 VBoxSysInfo.sh \
147 VBox.sh \
148 VBox.png \
149 src
150
151# Qt4 GUI
152ifdef VBOX_WITH_QTGUI
153 include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
154 VBOX_LNX_STRIP_BIN += \
155 VBoxKeyboard.so \
156 VirtualBox \
157 $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
158 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
159 VBOX_LNX_NO_STRIP += \
160 virtualbox.desktop \
161 $(VBOX_LICENSE_FILES) \
162 $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_BIN)/lib*VBox*)),) \
163 $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
164 $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
165endif
166
167# Guest Additions
168ifdef VBOX_WITH_ADDITIONS_PACKING
169 VBOX_LNX_NO_STRIP += \
170 additions/VBoxGuestAdditions.iso
171endif
172
173# Documentation
174ifdef VBOX_WITH_DOCS_PACKING
175 VBOX_LNX_NO_STRIP += \
176 UserManual.pdf \
177 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf)
178 ifdef VBOX_WITH_DOCS_CHM
179 VBOX_LNX_NO_STRIP += \
180 VirtualBox.chm \
181 $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm)
182 endif
183 VBOX_LNX_STRIP_BIN += \
184 $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
185endif
186
187# VRDP
188ifdef VBOX_WITH_VRDP
189 VBOX_LNX_STRIP_BIN += \
190 VBoxVRDP.so \
191 VRDPAuth.so \
192 VRDPAuthSimple.so
193 ifdef VBOX_WITH_VRDP_RDESKTOP
194 VBOX_LNX_NO_STRIP += \
195 rdesktop-vrdp.tar.gz
196 VBOX_LNX_NO_STRIP += \
197 rdesktop-vrdp-keymaps
198 VBOX_LNX_STRIP_BIN += \
199 rdesktop-vrdp
200 endif
201endif
202
203# Python XPCOM glue
204ifdef VBOX_WITH_PYTHON
205 VBOX_LNX_NO_STRIP += \
206 $(foreach f,$(notdir $(wildcard $(PATH_BIN)/sdk/bindings/xpcom/python/xpcom/*.py)),sdk/bindings/xpcom/python/xpcom/$(f)) \
207 sdk/bindings/xpcom/python/xpcom/client/__init__.py \
208 sdk/bindings/xpcom/python/xpcom/server/__init__.py \
209 sdk/bindings/xpcom/python/xpcom/server/enumerator.py \
210 sdk/bindings/xpcom/python/xpcom/server/factory.py \
211 sdk/bindings/xpcom/python/xpcom/server/loader.py \
212 sdk/bindings/xpcom/python/xpcom/server/module.py \
213 sdk/bindings/xpcom/python/xpcom/server/policy.py \
214 sdk/installer/vboxapisetup.py \
215 sdk/installer/vboxapi/__init__.py \
216 sdk/installer/vboxapi/VirtualBox_constants.py
217endif
218
219# Java XPCOM bridge
220ifdef VBOX_WITH_JXPCOM
221 VBOX_LNX_NO_STRIP += \
222 sdk/bindings/xpcom/java/vboxjxpcom.jar
223endif
224
225# Headless
226ifdef VBOX_WITH_HEADLESS
227 VBOX_LNX_STRIP_BIN += \
228 VBoxHeadless \
229 $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
230endif
231
232# BFE
233ifdef VBOX_WITH_BFE
234 VBOX_LNX_STRIP_BIN += \
235 VBoxBFE \
236 $(if $(VBOX_WITH_HARDENING),VBoxBFE.so)
237endif
238
239# Webservices
240ifdef VBOX_WITH_WEBSERVICES
241 VBOX_LNX_STRIP_BIN += \
242 vboxwebsrv \
243 webtest
244endif
245
246# EFI firmware
247ifdef VBOX_WITH_EFIFW_PACKING
248 VBOX_LNX_NO_STRIP += \
249 VBoxEFI32.fd \
250 VBoxEFI64.fd
251endif
252
253#
254# All the bin files that goes into the archives.
255#
256VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP)
257
258# Cleanup of the files we copy/symlink from bin.
259OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_ARCH_FILES)) \
260 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
261
262
263#
264# The generic installer.
265#
266$(PATH_BIN)/$(VBOX_LNX_PACKAGE_NAME): \
267 $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \
268 $(VBOX_VERSION_STAMP) \
269 $(VBOX_PATH_LNX_INST_SRC)/routines.sh \
270 $(VBOX_PATH_LNX_INST_SRC)/deffiles \
271 $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
272 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh \
273 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh \
274 $(VBOX_LNX_INST_OUT_DIR)/install.sh \
275 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py \
276 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh \
277 $(wildcard $(PATH_BIN)/src/*) \
278 $(wildcard $(PATH_BIN)/src/*/*) \
279 $(wildcard $(PATH_BIN)/src/*/*/*) \
280 $(wildcard $(PATH_BIN)/src/*/*/*/*)
281 $(call MSG_TOOL,makeself,,$@)
282 $(QUIET)$(RM) -f $(wildcard $(PATH_BIN)/VirtualBox-*.run)
283 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/routines.sh $(VBOX_LNX_INST_STAGE_DIR)/
284 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/deffiles $(VBOX_LNX_INST_STAGE_DIR)/
285 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE)
286 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh $(VBOX_LNX_INST_STAGE_DIR)/
287 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh $(VBOX_LNX_INST_STAGE_DIR)/
288 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/vboxdrv-pardus.py $(VBOX_LNX_INST_STAGE_DIR)/
289 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/
290 $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_LNX_INST_SRC)/uninstall.sh $(VBOX_LNX_INST_STAGE_DIR)/
291 $(QUIET)$(RM) -f $@
292 $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \
293 "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
294
295# files that needs editing before they can be included in the generic installer.
296$(VBOX_LNX_INST_OUT_DIR)/vboxdrv.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxdrv.sh.in | $$(dir $$@)
297 $(QUIET)$(SED_EXT) \
298 -e "s|%NOLSB%|yes|g" \
299 -e "s|%DEBIAN%||g" \
300 -e "s|%PACKAGE%|virtualbox|g" \
301 --output $@ \
302 $<
303
304$(VBOX_LNX_INST_OUT_DIR)/vboxweb-service.sh: $(VBOX_PATH_LNX_INST_SRC)/vboxweb-service.sh.in | $$(dir $$@)
305 $(QUIET)$(SED_EXT) \
306 -e "s|%NOLSB%|yes|g" \
307 -e "s|%DEBIAN%||g" \
308 -e "s|%PACKAGE%|virtualbox|g" \
309 --output $@ \
310 $<
311
312$(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) | $$(dir $$@)
313 $(QUIET)$(SED) \
314 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \
315 -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \
316 -e "s;_BUILD_;$(date-utc );g" \
317 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \
318 -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \
319 -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \
320 --output $@ \
321 $<
322
323#
324# .tar.bz2 for converting into .run
325#
326$(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: \
327 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
328 $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
329 $(VBOX_VERSION_STAMP)
330 $(call MSG_L1,Packing $@)
331 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
332 $(QUIET)$(MKDIR) -p $(@D)
333ifdef VBOX_USE_PBZIP2
334 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
335 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
336else
337 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES)
338endif
339 $(QUIET)$(CHMOD) 0644 $@
340
341#
342# .tar.bz2 for distribution with the files under VirtualBox-<ver>/.
343#
344$(PATH_BIN)/VirtualBox.tar.bz2: \
345 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \
346 $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \
347 $(VBOX_VERSION_STAMP)
348 $(call MSG_L1,Packing $@)
349 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@)
350 $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
351ifdef VBOX_USE_PBZIP2
352 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR) \
353 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
354 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
355else
356 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \
357 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES))
358endif
359 $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING)
360
361
362# pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/
363$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \
364 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% \
365 $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
366 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \
367 | $$(dir $$@)
368 $(call MSG_INST_FILE,$<,$@)
369 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
370 $(QUIET)$(if $(VBOX_NO_LINUX_RUN_INSTALLER),,objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_INST_OUT_DIR)/archive,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH),$@) $@)
371
372# pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/
373$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \
374 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
375 $(call MSG_INST_FILE,$<,$@)
376ifeq ($(VBOX_DO_STRIP),)
377 $(QUIET)$(INSTALL) -m 0644 $< $@
378else # strip to temp file because of umask.
379 $(QUIET)objcopy --strip-unneeded -R .comment $< [email protected]
380 $(QUIET)$(INSTALL) -m 0644 [email protected] $@
381 $(QUIET)$(RM) -f -- [email protected]
382endif
383
384# pattern rule for linking the VBOX_LNX_NO_STRIP into archive/
385$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \
386 $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_BIN)/% | $$(dir $$@)
387 $(call MSG_INST_SYM,$<,$@)
388 $(QUIET)$(RM) -f $@
389 $(QUIET)$(LN_SYMLINK) $< $@
390
391# rules for creating directories in archive (the pattern rules depends on these). ## @todo use BLDDIRS
392BLDDIRS += $(foreach d,\
393 archive \
394 archive/components \
395 archive/nls \
396 $(if $(VBOX_WITH_QT4_SUN),archive/accessible,) \
397 $(if $(VBOX_WITH_PYTHON),\
398 archive/sdk/installer \
399 archive/sdk/installer/vboxapi \
400 archive/sdk/bindings/xpcom/python/xpcom \
401 archive/sdk/bindings/xpcom/python/xpcom/client \
402 archive/sdk/bindings/xpcom/python/xpcom/server,) \
403 $(if $(VBOX_WITH_JXPCOM),\
404 archive/sdk/bindings/xpcom/java,) \
405 archive/additions \
406 install\
407,$(VBOX_LNX_INST_OUT_DIR)/$(d)/)
408
409
410#
411# .tar.bz2 for with the debug info.
412#
413$(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
414 $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/, $(VBOX_LNX_STRIP_BIN))
415 $(call MSG_L1,Packing $@)
416 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@)
417ifdef VBOX_USE_PBZIP2
418 $(QUIET)tar --owner 0 --group 0 -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
419 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
420 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@)
421else
422 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \
423 $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN))
424endif
425
426# pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/
427$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \
428 $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_BIN)/% | $$(dir $$@)
429 $(call MSG_TOOL,copydbg,$<,$@)
430 $(QUIET)objcopy --only-keep-debug $< $@
431
432# rules for creating directories in archive-dbg (the pattern rules depends on these). ## @todo use BLDDIRS
433BLDDIRS += $(foreach d,\
434 $(VBOX_LNX_DBG_PATH) \
435 $(VBOX_LNX_DBG_PATH)/components \
436,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/)
437
438include $(KBUILD_PATH)/subfooter.kmk
439
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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