Changeset 24361 in vbox for trunk/src/VBox
- Timestamp:
- Nov 5, 2009 12:14:18 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/Makefile.kmk
r23452 r24361 32 32 # Globals 33 33 # 34 VBOX_LNX_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux 35 VBOX_PATH_LINUX_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/installer 36 VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/Installer 34 35 # Basic path components 36 VBOX_LNX_ADD_PACKAGE_NAME := VBoxGuestAdditions 37 VBOX_LNX_ADD_INST_OUT_DIR := $(PATH_TARGET)/Additions/Installer/linux 38 VBOX_LNX_ADD_INST_DBG_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/debug 39 VBOX_LNX_ADD_INST_STAGE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/install 40 41 # Installation paths for binaries and files 42 VBOX_LNX_ADD_INST_BIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/bin 43 VBOX_LNX_ADD_INST_SBIN_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/sbin 44 VBOX_LNX_ADD_INST_LIB_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/lib 45 VBOX_LNX_ADD_INST_SHARE_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/share 46 VBOX_LNX_ADD_INST_MOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/lib/$(VBOX_LNX_ADD_PACKAGE_NAME) 47 VBOX_LNX_ADD_INST_KMOD_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/src 48 VBOX_LNX_ADD_INST_INIT_DIR := $(VBOX_LNX_ADD_INST_OUT_DIR)/init 49 50 # Installation paths for debug symbols 51 VBOX_LNX_ADD_INST_BIN_DBG_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)/bin 52 VBOX_LNX_ADD_INST_SBIN_DBG_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)/sbin 53 VBOX_LNX_ADD_INST_LIB_DBG_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)/lib 54 VBOX_LNX_ADD_INST_MOD_DBG_DIR := $(VBOX_LNX_ADD_INST_DBG_DIR)/lib/$(VBOX_LNX_ADD_PACKAGE_NAME) 55 56 # Script source directories 57 VBOX_PATH_LNX_ADD_INST := $(PATH_SUB_CURRENT)/installer 58 VBOX_REL_LNX_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, \ 59 ../..,$(VBOX_PATH_LNX_ADD_INST)) 60 VBOX_PATH_X11_ADD_INST := $(PATH_ROOT)/src/VBox/Additions/x11/Installer 61 VBOX_REL_X11_ADD_INST := $(subst $(PATH_ROOT)/src/VBox, \ 62 ../..,$(VBOX_PATH_X11_ADD_INST)) 63 VBOX_PATH_LNX_INST_SRC := $(PATH_ROOT)/src/VBox/Installer/linux 64 VBOX_REL_LNX_INST_SRC := $(subst $(PATH_ROOT)/src/VBox, \ 65 ../..,$(VBOX_PATH_LNX_INST_SRC)) 66 67 # Unset this to speed up things during makefile hacking. 68 VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) 37 69 38 70 … … 41 73 # 42 74 ifndef VBOX_OSE 43 BLDDIRS += $(VBOX_LNX_ADD_INS_OUT_DIR) $(VBOX_LNX_ADD_INS_OUT_DIR)/module 44 PACKING += $(PATH_BIN)/additions/VBoxLinuxAdditions.run 75 BLDDIRS += \ 76 $(VBOX_LNX_ADD_INST_OUT_DIR) \ 77 $(VBOX_LNX_ADD_INST_BIN_DIR) \ 78 $(VBOX_LNX_ADD_INST_SBIN_DIR) \ 79 $(VBOX_LNX_ADD_INST_LIB_DIR) \ 80 $(VBOX_LNX_ADD_INST_MOD_DIR) \ 81 $(VBOX_LNX_ADD_INST_KMOD_DIR) \ 82 $(VBOX_LNX_ADD_INST_INIT_DIR) \ 83 $(VBOX_LNX_ADD_INST_DBG_DIR) \ 84 $(VBOX_LNX_ADD_INST_BIN_DBG_DIR) \ 85 $(VBOX_LNX_ADD_INST_SBIN_DBG_DIR) \ 86 $(VBOX_LNX_ADD_INST_LIB_DBG_DIR) \ 87 $(VBOX_LNX_ADD_INST_MOD_DBG_DIR) \ 88 $(VBOX_LNX_ADD_INST_STAGE_DIR) 89 PACKING += \ 90 $(PATH_BIN)/additions/VBoxLinuxAdditions.run \ 91 $(VBOX_LNX_ADD_INST_STAGE_DIR)/VBoxGuestAdditions.tar.bz2 45 92 OTHER_CLEAN += $(PACKING) 46 93 # OSE only contains the source code for this … … 53 100 # 54 101 VBOX_ADD_STRIP_BIN += \ 55 VBoxService \ 56 VBoxClient \ 57 VBoxControl \ 102 VBoxControl 103 104 VBOX_ADD_STRIP_BIN.linux += \ 105 VBoxClient 106 107 VBOX_ADD_BIN.linux += \ 108 VBoxClient-all \ 109 VBoxRandR 110 111 VBOX_ADD_STRIP_SBIN += \ 112 VBoxService 113 114 VBOX_ADD_STRIP_LIB += \ 58 115 VBoxOGLarrayspu.so \ 59 116 VBoxOGLcrutil.so \ … … 64 121 VBoxOGL.so 65 122 66 VBOX_ADD_STRIP_ BIN.linux = \123 VBOX_ADD_STRIP_MOD.linux = \ 67 124 vboxmouse_drv_70.so \ 68 125 vboxmouse_drv_71.so \ … … 84 141 vboxvideo_drv.o 85 142 86 VBOX_ADD_MODULES.linux = \ 87 vboxguest \ 143 VBOX_ADD_KMOD = \ 144 vboxguest 145 146 VBOX_ADD_KMOD.linux = \ 88 147 vboxvfs \ 89 148 vboxvideo_drm 90 149 150 VBOX_ADD_INIT.linux = \ 151 vboxadd \ 152 vboxadd-service \ 153 vboxadd-x11 154 91 155 VBOX_LNX_ADD_STRIP_BIN = $(VBOX_ADD_STRIP_BIN) $(VBOX_ADD_STRIP_BIN.linux) 156 VBOX_LNX_ADD_BIN = $(VBOX_ADD_BIN) $(VBOX_ADD_BIN.linux) 157 VBOX_LNX_ADD_STRIP_SBIN = $(VBOX_ADD_STRIP_SBIN) $(VBOX_ADD_STRIP_SBIN.linux) 158 VBOX_LNX_ADD_STRIP_LIB = $(VBOX_ADD_STRIP_LIB) $(VBOX_ADD_STRIP_LIB.linux) 159 VBOX_LNX_ADD_STRIP_MOD = $(VBOX_ADD_STRIP_MOD) $(VBOX_ADD_STRIP_MOD.linux) 92 160 VBOX_LNX_ADD_STRIP_OBJ = $(VBOX_ADD_STRIP_OBJ) $(VBOX_ADD_STRIP_OBJ.linux) 93 VBOX_LNX_ADD_MODULES = $(VBOX_ADD_MODULES) $(VBOX_ADD_MODULES.linux) 94 95 # 96 # All the bin files that go into the archives. 97 # 98 VBOX_LNX_ADD_DBG_SYM_FILES := $(addsuffix .dbgsym,$(VBOX_LNX_ADD_STRIP_BIN)) 99 VBOX_LNX_ADD_INS_FILES := $(addprefix $(VBOX_LNX_ADD_INS_OUT_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN) $(VBOX_LNX_ADD_STRIP_OBJ) $(VBOX_LNX_ADD_DBG_SYM_FILES)) 100 VBOX_LNX_ADD_INS_MODULES := $(addprefix $(VBOX_LNX_ADD_INS_OUT_DIR)/module/,$(VBOX_LNX_ADD_MODULES)) 161 VBOX_LNX_ADD_KMOD = $(VBOX_ADD_KMOD) $(VBOX_ADD_KMOD.linux) 162 VBOX_LNX_ADD_INIT = $(VBOX_ADD_INIT) $(VBOX_ADD_INIT.linux) 163 164 VBOX_LNX_ADD_KMOD_VERSIONED := $(addsuffix -$(VBOX_VERSION_STRING),$(VBOX_LNX_ADD_KMOD)) 165 166 # 167 # All the files that go into the archive 168 # 169 VBOX_LNX_ADD_INST_FILES := \ 170 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN)) \ 171 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR)/,$(VBOX_LNX_ADD_BIN)) \ 172 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR)/,$(VBOX_LNX_ADD_STRIP_SBIN)) \ 173 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR)/,$(VBOX_LNX_ADD_STRIP_LIB)) \ 174 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR)/,$(VBOX_LNX_ADD_STRIP_MOD)) \ 175 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR)/,$(VBOX_LNX_ADD_STRIP_OBJ)) \ 176 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR)/,$(VBOX_LNX_ADD_KMOD_VERSIONED)) \ 177 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR)/,$(VBOX_LNX_ADD_INIT)) \ 178 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN)) \ 179 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_SBIN)) \ 180 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_LIB)) \ 181 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_MOD)) 101 182 102 183 # Cleanup of the the installer directory files 103 OTHER_CLEAN += $(VBOX_LNX_ADD_INS _FILES)) $(VBOX_LNX_ADD_INS_MODULES)104 105 # pattern rule for copying the debug info from the VBOX_LNX_ADD_STRIP_BINfiles to the installation directory106 $(addprefix $(VBOX_LNX_ADD_INS _OUT_DIR)/,$(VBOX_LNX_ADD_DBG_SYM_FILES)): \107 $(VBOX_LNX_ADD_INS _OUT_DIR)/%.dbgsym: $(PATH_BIN)/additions/% | $$(dir $$@)184 OTHER_CLEAN += $(VBOX_LNX_ADD_INST_FILES) 185 186 # pattern rules for copying the debug info from the VBOX_LNX_ADD_STRIP_* files to the installation directory 187 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN)): \ 188 $(VBOX_LNX_ADD_INST_BIN_DBG_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 108 189 $(call MSG_TOOL,copydbg,$<,$@) 109 190 $(QUIET)objcopy --only-keep-debug $< $@ 110 191 192 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_SBIN)): \ 193 $(VBOX_LNX_ADD_INST_SBIN_DBG_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 194 $(call MSG_TOOL,copydbg,$<,$@) 195 $(QUIET)objcopy --only-keep-debug $< $@ 196 197 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_LIB)): \ 198 $(VBOX_LNX_ADD_INST_LIB_DBG_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 199 $(call MSG_TOOL,copydbg,$<,$@) 200 $(QUIET)objcopy --only-keep-debug $< $@ 201 202 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DBG_DIR)/,$(VBOX_LNX_ADD_STRIP_MOD)): \ 203 $(VBOX_LNX_ADD_INST_MOD_DBG_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 204 $(call MSG_TOOL,copydbg,$<,$@) 205 $(QUIET)objcopy --only-keep-debug $< $@ 206 111 207 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_BIN files to the installation directory 112 $(addprefix $(VBOX_LNX_ADD_INS _OUT_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN)): \113 $(VBOX_LNX_ADD_INS _OUT_DIR)/% : $(PATH_BIN)/additions/% \114 $(VBOX_LNX_ADD_INS _OUT_DIR)/%.dbgsym\208 $(addprefix $(VBOX_LNX_ADD_INST_BIN_DIR)/,$(VBOX_LNX_ADD_STRIP_BIN)): \ 209 $(VBOX_LNX_ADD_INST_BIN_DIR)/% : $(PATH_BIN)/additions/% \ 210 $(VBOX_LNX_ADD_INST_BIN_DBG_DIR)/% \ 115 211 | $$(dir $$@) 116 212 $(call MSG_INST_FILE,$<,$@) 117 213 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ 118 $(QUIET)objcopy --add-gnu-debuglink=$(addsuffix .dbgsym,$@) $@ 214 $(QUIET)objcopy --add-gnu-debuglink=$@ $@ 215 216 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_SBIN files to the installation directory 217 $(addprefix $(VBOX_LNX_ADD_INST_SBIN_DIR)/,$(VBOX_LNX_ADD_STRIP_SBIN)): \ 218 $(VBOX_LNX_ADD_INST_SBIN_DIR)/% : $(PATH_BIN)/additions/% \ 219 $(VBOX_LNX_ADD_INST_SBIN_DBG_DIR)/% \ 220 | $$(dir $$@) 221 $(call MSG_INST_FILE,$<,$@) 222 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ 223 $(QUIET)objcopy --add-gnu-debuglink=$@ $@ 224 225 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_LIB files to the installation directory 226 $(addprefix $(VBOX_LNX_ADD_INST_LIB_DIR)/,$(VBOX_LNX_ADD_STRIP_LIB)): \ 227 $(VBOX_LNX_ADD_INST_LIB_DIR)/% : $(PATH_BIN)/additions/% \ 228 $(VBOX_LNX_ADD_INST_LIB_DBG_DIR)/% \ 229 | $$(dir $$@) 230 $(call MSG_INST_FILE,$<,$@) 231 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ 232 $(QUIET)objcopy --add-gnu-debuglink=$@ $@ 233 234 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_MOD files to the installation directory 235 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR)/,$(VBOX_LNX_ADD_STRIP_MOD)): \ 236 $(VBOX_LNX_ADD_INST_MOD_DIR)/% : $(PATH_BIN)/additions/% \ 237 $(VBOX_LNX_ADD_INST_MOD_DBG_DIR)/% \ 238 | $$(dir $$@) 239 $(call MSG_INST_FILE,$<,$@) 240 $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ 241 $(QUIET)objcopy --add-gnu-debuglink=$@ $@ 119 242 120 243 # pattern rule for stripping and copying the VBOX_LNX_ADD_STRIP_OBJ files to the installation directory 121 $(addprefix $(VBOX_LNX_ADD_INS _OUT_DIR)/,$(VBOX_LNX_ADD_STRIP_OBJ)): \122 $(VBOX_LNX_ADD_INS _OUT_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@)244 $(addprefix $(VBOX_LNX_ADD_INST_MOD_DIR)/,$(VBOX_LNX_ADD_STRIP_OBJ)): \ 245 $(VBOX_LNX_ADD_INST_MOD_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 123 246 $(call MSG_INST_FILE,$<,$@) 124 247 ifeq ($(VBOX_DO_STRIP),) … … 130 253 endif 131 254 132 # pattern rule for copying the VBOX_LNX_ADD_ MODULESfiles to the installation directory133 $( VBOX_LNX_ADD_INS_MODULES): \134 $(VBOX_LNX_ADD_INS _OUT_DIR)/module/% : $(PATH_BIN)/additions/src/% | $(VBOX_LNX_ADD_INS_OUT_DIR)/module/255 # pattern rule for copying the VBOX_LNX_ADD_KMOD files to the installation directory 256 $(addprefix $(VBOX_LNX_ADD_INST_KMOD_DIR)/,$(VBOX_LNX_ADD_KMOD_VERSIONED)): \ 257 $(VBOX_LNX_ADD_INST_KMOD_DIR)/%-$(VBOX_VERSION_STRING) : $(PATH_BIN)/additions/src/% | $(VBOX_LNX_ADD_INST_KMOD_DIR)/ 135 258 $(call MSG_INST_FILE,$<,$@) 136 259 # Remove target directories first, otherwise the behaviour of cp will not be 137 260 # what we want if it already exists. See the cp manual page for more details. 138 261 $(QUIET)$(RM) -Rf $@ 139 $(QUIET)cp -af $< $(VBOX_LNX_ADD_INS_OUT_DIR)/module 140 141 142 INSTALLS += $(if $(VBOX_OSE),, lnx_add_inst-nobin) 143 lnx_add_inst-nobin_INST = obj/Additions/Installer/linux 144 lnx_add_inst-nobin_MODE = a+r,u+w 145 lnx_add_inst-nobin_SOURCES = \ 146 ../x11/Installer/VBoxRandR.sh \ 147 installer/vboxadd-service.sh \ 148 ../x11/Installer/98vboxadd-xclient \ 149 ../x11/Installer/vboxclient.desktop \ 150 installer/vboxadd.sh \ 151 ../x11/Installer/vboxvideo.ids \ 152 ../x11/Installer/linux_xorg_suse11.conf \ 153 installer/90-vboxguest.fdi 154 155 156 INSTALLS += $(if $(VBOX_OSE),, lnx_add_inst-bin) 157 lnx_add_inst-bin_INST = obj/Additions/Installer/linux 158 lnx_add_inst-bin_MODE = a+rx,u+w 159 lnx_add_inst-bin_SOURCES = \ 160 ../../Installer/linux/routines.sh \ 161 ../x11/Installer/x11config.pl \ 162 ../x11/Installer/x11config15.pl \ 163 selinux-fedora/vbox_x11.pp 262 $(QUIET)cp -af $< $@ 263 264 # pattern rule for copying the VBOX_LNX_ADD_INIT files to the installation directory 265 $(addprefix $(VBOX_LNX_ADD_INST_INIT_DIR)/,$(VBOX_LNX_ADD_INIT)): \ 266 $(VBOX_LNX_ADD_INST_INIT_DIR)/% : $(PATH_BIN)/additions/% | $$(dir $$@) 267 $(call MSG_INST_FILE,$<,$@) 268 # Remove target directories first, otherwise the behaviour of cp will not be 269 # what we want if it already exists. See the cp manual page for more details. 270 $(QUIET)$(RM) -Rf $@ 271 $(QUIET)cp -af $< $@ 272 273 274 INSTALLS += $(if $(VBOX_OSE),, lnx_add_inst-exec) 275 lnx_add_inst-exec_INST = $(subst $(PATH_TARGET),obj, \ 276 $(VBOX_LNX_ADD_INST_MOD_DIR)) 277 lnx_add_inst-exec_MODE = a+rx,u+w 278 lnx_add_inst-exec_SOURCES = \ 279 $(VBOX_REL_LNX_ADD_INST)/vboxadd-service.sh \ 280 $(VBOX_REL_X11_ADD_INST)/98vboxadd-xclient \ 281 $(VBOX_REL_LNX_ADD_INST)/vboxadd.sh \ 282 $(VBOX_REL_X11_ADD_INST)/x11config.pl \ 283 $(VBOX_REL_X11_ADD_INST)/x11config15.pl \ 284 $(VBOX_REL_LNX_INST_SRC)/routines.sh 285 286 287 INSTALLS += $(if $(VBOX_OSE),, lnx_add_inst-noexec) 288 lnx_add_inst-noexec_INST = $(subst $(PATH_TARGET),obj, \ 289 $(VBOX_LNX_ADD_INST_SHARE_DIR)/$(VBOX_LNX_ADD_PACKAGE_NAME)) 290 lnx_add_inst-noexec_MODE = a+r,u+w 291 lnx_add_inst-noexec_SOURCES = \ 292 $(VBOX_REL_X11_ADD_INST)/vboxclient.desktop \ 293 $(VBOX_REL_X11_ADD_INST)/vboxvideo.ids \ 294 $(VBOX_REL_X11_ADD_INST)/linux_xorg_suse11.conf \ 295 $(VBOX_REL_LNX_ADD_INST)/90-vboxguest.fdi \ 296 selinux-fedora/vbox_x11.pp 164 297 165 298 … … 173 306 AutoRun-sh_INST = bin/additions/ 174 307 AutoRun-sh_MODE = a+rx,u+w 175 AutoRun-sh_SOURCES = $(VBOX_ PATH_LINUX_ADDITION_INSTALLER)/autorun.sh308 AutoRun-sh_SOURCES = $(VBOX_REL_LNX_ADD_INST)/autorun.sh 176 309 177 310 … … 180 313 # 181 314 INSTALLS += $(if $(VBOX_OSE),, LnxAddTest-src) 182 LnxAddTest-src_INST = obj/Additions/Installer/linux/module/test 315 LnxAddTest-src_INST = $(subst $(PATH_TARGET),obj, \ 316 $(VBOX_LNX_ADD_INST_SHARE_DIR)/$(VBOX_LNX_ADD_PACKAGE_NAME))/test 183 317 LnxAddTest-src_MODE = a+r,u+w 184 318 LnxAddTest-src_SOURCES = \ 185 installer/Makefile.test=>Makefile \ 186 installer/test.c 319 $(VBOX_REL_LNX_ADD_INST)/Makefile.test=>Makefile \ 320 ../../HostDrivers/linux/build_in_tmp \ 321 $(VBOX_REL_LNX_ADD_INST)/test.c 187 322 188 323 … … 191 326 # 192 327 INSTALLS += $(if $(VBOX_OSE),, LnxAddDRM-src) 193 LnxAddDRM-src_INST = obj/Additions/Installer/linux/module/test_drm 328 LnxAddDRM-src_INST = $(subst $(PATH_TARGET),obj, \ 329 $(VBOX_LNX_ADD_INST_SHARE_DIR)/$(VBOX_LNX_ADD_PACKAGE_NAME))/test_drm 194 330 LnxAddDRM-src_MODE = a+r,u+w 195 331 LnxAddDRM-src_SOURCES = \ 196 installer/Makefile.include.header \ 197 installer/Makefile.include.footer \ 198 installer/Makefile.test.drm=>Makefile \ 199 installer/test_drm.c 332 $(VBOX_REL_LNX_ADD_INST)/Makefile.include.header \ 333 $(VBOX_REL_LNX_ADD_INST)/Makefile.include.footer \ 334 $(VBOX_REL_LNX_ADD_INST)/Makefile.test.drm=>Makefile \ 335 ../../HostDrivers/linux/build_in_tmp \ 336 $(VBOX_REL_LNX_ADD_INST)/test_drm.c 200 337 201 338 202 339 # this file needs editing before it can be included in the generic installer. 203 $(VBOX_LNX_ADD_INS _OUT_DIR)/install.sh: \204 $(VBOX_PATH_L INUX_ADDITION_INSTALLER)/install.sh | $$(dir $$@)340 $(VBOX_LNX_ADD_INST_STAGE_DIR)/install.sh: \ 341 $(VBOX_PATH_LNX_INST_SRC)/run-inst.sh | $$(dir $$@) 205 342 $(QUIET)$(SED) \ 343 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ 344 -e "s;_PACKAGE_NAME_;VirtualBox Guest Additions;g" \ 345 -e "s;_PACKAGE_;VBoxGuestAdditions;g" \ 206 346 -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ 207 347 -e "s;_BUILD_;$(shell date);g" \ … … 209 349 -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \ 210 350 -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \ 211 --output $(VBOX_LNX_ADD_INS _OUT_DIR)/install_.sh \351 --output $(VBOX_LNX_ADD_INST_OUT_DIR)/install.sh \ 212 352 $< 213 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh $@ 214 $(QUIET)$(RM) $(VBOX_LNX_ADD_INS_OUT_DIR)/install_.sh 215 OTHERS_CLEAN += $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh 353 $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_ADD_INST_OUT_DIR)/install.sh $@ 354 $(QUIET)$(RM) $(VBOX_LNX_ADD_INST_OUT_DIR)/install.sh 355 OTHERS_CLEAN += \ 356 $(VBOX_LNX_ADD_INST_OUT_DIR)/install.sh \ 357 $(VBOX_LNX_ADD_INST_STAGE_DIR)/install.sh 358 359 360 # 361 # We need our routines.sh and the uninstallation scripts in the staging 362 # directory too 363 # 364 INSTALLS += $(if $(VBOX_OSE),, LnxAdd-scripts) 365 LnxAdd-scripts_INST = $(subst $(PATH_TARGET),obj, \ 366 $(VBOX_LNX_ADD_INST_STAGE_DIR)) 367 LnxAdd-scripts_MODE = a+r,u+wx 368 LnxAdd-scripts_SOURCES = \ 369 $(VBOX_REL_LNX_INST_SRC)/routines.sh \ 370 $(VBOX_REL_LNX_ADD_INST)/uninstall.sh \ 371 $(VBOX_REL_LNX_ADD_INST)/deffiles 372 373 374 # 375 # VBoxClient-all 376 # 377 INSTALLS += $(if $(VBOX_OSE),, LnxAdd-Nostrip-Bin) 378 LnxAdd-Nostrip-Bin_INST = $(subst $(PATH_TARGET),obj, \ 379 $(VBOX_LNX_ADD_INST_BIN_DIR)) 380 LnxAdd-Nostrip-Bin_MODE = a+r,u+wx 381 LnxAdd-Nostrip-Bin_SOURCES = \ 382 $(VBOX_REL_X11_ADD_INST)/VBoxRandR.sh=>VBoxRandR \ 383 $(VBOX_REL_X11_ADD_INST)/98vboxadd-xclient=>VBoxClient-all 384 385 386 # 387 # And the init scripts 388 # 389 INSTALLS += $(if $(VBOX_OSE),, LnxAdd-init-scripts) 390 LnxAdd-init-scripts_INST = bin/additions 391 LnxAdd-init-scripts_MODE = a+r,u+wx 392 LnxAdd-init-scripts_SOURCES = \ 393 $(foreach i,$(VBOX_LNX_ADD_INIT), installer/$(i).sh=>$(i)) 216 394 217 395 218 396 include $(KBUILD_PATH)/subfooter.kmk 397 398 399 # All the files that go into our archive 400 VBOX_LNX_ADD_ARCH_FILES = \ 401 $(INSTARGET_lnx_add_inst-noexec) \ 402 $(INSTARGET_lnx_add_inst-exec) \ 403 $(INSTARGET_LnxAddTest-src) \ 404 $(INSTARGET_LnxAddDRM-src) \ 405 $(VBOX_LNX_ADD_INST_FILES) 406 407 # 408 # .tar.bz2 for converting into .run 409 # 410 $(VBOX_LNX_ADD_INST_STAGE_DIR)/VBoxGuestAdditions.tar.bz2: \ 411 $(VBOX_LNX_ADD_ARCH_FILES) \ 412 $(VBOX_LNX_ADD_INST_DEP_ON_MAKEFILE) \ 413 $(VBOX_VERSION_STAMP) 414 $(call MSG_L1,Packing $@) 415 $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@) 416 $(QUIET)$(MKDIR) -p $(@D) 417 # .run-specific debug symbol stuff 418 $(QUIET)$(MKDIR) $(VBOX_LNX_ADD_INST_BIN_DIR)/.debug 419 $(QUIET)$(LN) -s $(addprefix ../../debug/bin/,$(VBOX_LNX_ADD_STRIP_BIN)) \ 420 $(VBOX_LNX_ADD_INST_BIN_DIR)/.debug 421 $(QUIET)$(MKDIR) $(VBOX_LNX_ADD_INST_SBIN_DIR)/.debug 422 $(QUIET)$(LN) -s $(addprefix ../../debug/sbin/,$(VBOX_LNX_ADD_STRIP_SBIN)) \ 423 $(VBOX_LNX_ADD_INST_SBIN_DIR)/.debug 424 $(QUIET)$(MKDIR) $(VBOX_LNX_ADD_INST_LIB_DIR)/.debug 425 $(QUIET)$(LN) -s $(addprefix ../../debug/lib/,$(VBOX_LNX_ADD_STRIP_LIB)) \ 426 $(VBOX_LNX_ADD_INST_LIB_DIR)/.debug 427 $(QUIET)$(MKDIR) $(VBOX_LNX_ADD_INST_MOD_DIR)/.debug 428 $(QUIET)$(LN) -s $(addprefix ../../../debug/lib/$(VBOX_LNX_ADD_PACKAGE_NAME)/,$(VBOX_LNX_ADD_STRIP_MOD)) \ 429 $(VBOX_LNX_ADD_INST_MOD_DIR)/.debug 430 ifdef VBOX_USE_PBZIP2 431 $(QUIET)tar --owner 0 --group 0 -cRf $(patsubst %.bz2,%,$@) \ 432 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \ 433 $(subst $(VBOX_LNX_ADD_INST_OUT_DIR)/,,$(VBOX_LNX_ADD_ARCH_FILES) \ 434 $(VBOX_LNX_ADD_INST_BIN_DIR)/.debug \ 435 $(VBOX_LNX_ADD_INST_SBIN_DIR)/.debug \ 436 $(VBOX_LNX_ADD_INST_LIB_DIR)/.debug \ 437 $(VBOX_LNX_ADD_INST_MOD_DIR)/.debug) 438 $(QUIET)pbzip2 $(patsubst %.bz2,%,$@) 439 else 440 $(QUIET)tar --owner 0 --group 0 -cjRf $@ \ 441 -C $(VBOX_LNX_ADD_INST_OUT_DIR) \ 442 $(subst $(VBOX_LNX_ADD_INST_OUT_DIR)/,,$(VBOX_LNX_ADD_ARCH_FILES) \ 443 $(VBOX_LNX_ADD_INST_BIN_DIR)/.debug \ 444 $(VBOX_LNX_ADD_INST_SBIN_DIR)/.debug \ 445 $(VBOX_LNX_ADD_INST_LIB_DIR)/.debug \ 446 $(VBOX_LNX_ADD_INST_MOD_DIR)/.debug) 447 endif 448 $(QUIET)$(CHMOD) 0644 $@ 449 # .run-specific debug symbol stuff 450 $(QUIET)$(RM) -Rf $(VBOX_LNX_ADD_INST_BIN_DIR)/.debug 451 $(QUIET)$(RM) -Rf $(VBOX_LNX_ADD_INST_SBIN_DIR)/.debug 452 $(QUIET)$(RM) -Rf $(VBOX_LNX_ADD_INST_LIB_DIR)/.debug 453 $(QUIET)$(RM) -Rf $(VBOX_LNX_ADD_INST_MOD_DIR)/.debug 219 454 220 455 … … 225 460 # any references should be made via variables assigned a know value via := . 226 461 # 227 # We need to depend on all source files for the additions and shared228 # folders kernel modules.229 ## @todo Replace the wildcard stuff by the correct file lists now that230 # we've got everything included.231 #232 462 $(PATH_BIN)/additions/VBoxLinuxAdditions.run: \ 233 $(INSTARGET_lnx_add_inst-nobin) \ 234 $(INSTARGET_lnx_add_inst-bin) \ 235 $(INSTARGET_LnxAddTest-src) \ 236 $(INSTARGET_LnxAddTestDRM-src) \ 237 $(VBOX_LNX_ADD_INS_FILES) \ 238 $(VBOX_LNX_ADD_INS_MODULES) \ 239 $(VBOX_LNX_ADD_INS_OUT_DIR)/install.sh \ 240 $(wildcard $(PATH_BIN)/additions/src/*) \ 241 $(wildcard $(PATH_BIN)/additions/src/*/*) \ 242 $(wildcard $(PATH_BIN)/additions/src/*/*/*) \ 243 $(wildcard $(PATH_BIN)/additions/src/*/*/*/*) \ 463 $(VBOX_LNX_ADD_INST_STAGE_DIR)/VBoxGuestAdditions.tar.bz2 \ 464 $(VBOX_LNX_ADD_INST_STAGE_DIR)/install.sh \ 465 $$(INSTARGET_LnxAdd-scripts) \ 244 466 $(VBOX_VERSION_STAMP) 245 $(QUIET)$(VBOX_MAKESELF) $(VBOX_LNX_ADD_INS_OUT_DIR) $@ \ 246 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux installation" /bin/sh ./install.sh "> /dev/null" 467 $(QUIET)$(VBOX_MAKESELF) --nocomp $(VBOX_LNX_ADD_INST_STAGE_DIR) $@ \ 468 "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for Linux" \ 469 /bin/sh ./install.sh "> /dev/null" -
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r22314 r24361 280 280 } 281 281 282 # setup_script 282 283 setup() 283 284 { … … 293 294 succ_msg 294 295 fi 295 begin "Recompiling VirtualBox kernel modules" 296 echo "Building VirtualBox kernel modules" 297 begin "Building the main VirtualBox module" 296 298 if ! $BUILDVBOXGUEST \ 297 299 --save-module-symvers /tmp/vboxguest-Module.symvers \ … … 299 301 fail "Look at $LOG to find out what went wrong" 300 302 fi 303 succ_msg 301 304 if [ -n "$BUILDVBOXVFS" ]; then 305 begin "Building the shared folder support module" 302 306 if ! $BUILDVBOXVFS \ 303 307 --use-module-symvers /tmp/vboxguest-Module.symvers \ … … 305 309 fail "Look at $LOG to find out what went wrong" 306 310 fi 311 succ_msg 307 312 fi 308 313 if [ -n "$BUILDVBOXVIDEO" ]; then 314 begin "Building the OpenGL support module" 309 315 if ! $BUILDVBOXVIDEO \ 310 316 --use-module-symvers /tmp/vboxguest-Module.symvers \ … … 312 318 fail "Look at $LOG to find out what went wrong" 313 319 fi 314 fi 320 succ_msg 321 fi 322 depmod 323 324 begin "Doing non-kernel setup of the Guest Additions" 325 echo "Creating user for the Guest Additions." >> $LOG 326 # This is the LSB version of useradd and should work on recent 327 # distributions 328 useradd -d /var/run/vboxadd -g 1 -r -s /bin/false vboxadd >/dev/null 2>&1 329 # And for the others, we choose a UID ourselves 330 useradd -d /var/run/vboxadd -g 1 -u 501 -o -s /bin/false vboxadd >/dev/null 2>&1 331 332 # Create udev description file 333 if [ -d /etc/udev/rules.d ]; then 334 echo "Creating udev rule for the Guest Additions kernel module." >> $LOG 335 udev_call="" 336 udev_app=`which udevadm 2> /dev/null` 337 if [ $? -eq 0 ]; then 338 udev_call="${udev_app} version 2> /dev/null" 339 else 340 udev_app=`which udevinfo 2> /dev/null` 341 if [ $? -eq 0 ]; then 342 udev_call="${udev_app} -V 2> /dev/null" 343 fi 344 fi 345 udev_fix="=" 346 if [ "${udev_call}" != "" ]; then 347 udev_out=`${udev_call}` 348 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 349 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 350 udev_fix="" 351 fi 352 fi 353 ## @todo 60-vboxadd.rules -> 60-vboxguest.rules ? 354 echo "KERNEL=${udev_fix}\"vboxguest\", NAME=\"vboxguest\", OWNER=\"vboxadd\", MODE=\"0660\"" > /etc/udev/rules.d/60-vboxadd.rules 355 echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules 356 fi 357 358 # Put mount.vboxsf in the right place 359 ln -s /usr/lib/VBoxGuestAdditions/mount.vboxsf /sbin 360 315 361 succ_msg 316 362 start … … 319 365 } 320 366 367 # cleanup_script 368 cleanup() 369 { 370 # Delete old versions of VBox modules. 371 DKMS=`which dkms 2>/dev/null` 372 if [ -n "$DKMS" ]; then 373 info "Attempt to remove old DKMS modules..." 374 for mod in vboxadd vboxguest vboxvfs vboxvideo; do 375 $DKMS status -m $mod | while read line; do 376 if echo "$line" | grep -q added > /dev/null || 377 echo "$line" | grep -q built > /dev/null || 378 echo "$line" | grep -q installed > /dev/null; then 379 version=`echo "$line" | sed "s/$mod,\([^,]*\)[,:].*/\1/;t;d"` 380 info " removing module $mod version $version" 381 $DKMS remove -m $mod -v $version --all 382 fi 383 done 384 done 385 info "Done." 386 fi 387 388 # Remove old installed modules 389 find /lib/modules -name vboxadd\* | xargs rm 2>/dev/null 390 find /lib/modules -name vboxguest\* | xargs rm 2>/dev/null 391 find /lib/modules -name vboxvfs\* | xargs rm 2>/dev/null 392 find /lib/modules -name vboxvideo\* | xargs rm 2>/dev/null 393 depmod 394 395 # Remove other files 396 rm /sbin/mount.vboxsf 2>/dev/null 397 } 398 321 399 dmnstatus() 322 400 { … … 341 419 setup 342 420 ;; 421 cleanup) 422 cleanup 423 ;; 343 424 status) 344 425 dmnstatus -
trunk/src/VBox/HostDrivers/linux/build_in_tmp
r23850 r24361 22 22 # Attempt to build using DKMS first 23 23 DKMS=`which dkms 2>/dev/null` 24 if [ "$1" = "--no-dkms" ]; then 25 shift 26 DKMS="" 27 fi 24 28 if [ -n "$DKMS" ] 25 29 then
Note:
See TracChangeset
for help on using the changeset viewer.