diff -p -up VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile.kernelrelease VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile --- VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile.kernelrelease 2008-02-19 12:49:05.000000000 +0100 +++ VirtualBox-1.5.6_OSE/src/VBox/HostDrivers/Support/linux/Makefile 2008-02-26 22:43:17.000000000 +0100 @@ -67,8 +67,8 @@ ifeq ($(KERNELRELEASE),) # kernel base directory ifndef KERN_DIR - # build for the current kernel, version check - KERN_DIR := /lib/modules/$(shell uname -r)/build + # build for the current kernel, version check + KERN_DIR := /lib/modules/$(KERNELRELEASE)/build ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) KERN_DIR := /usr/src/linux ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) @@ -82,9 +82,9 @@ ifeq ($(KERNELRELEASE),) # check if versions match -- works only for later 2.6 kernels VBOX_KERN_VER := $(shell $(MAKE) -sC $(KERN_DIR) kernelrelease 2> /dev/null || true) ifneq ($(VBOX_KERN_VER),) - ifneq ($(VBOX_KERN_VER),$(shell uname -r)) + ifneq ($(VBOX_KERN_VER),$(KERNELRELEASE)) $(error Error: /usr/src/linux (version $(VBOX_KERN_VER)) does not match \ - the current kernel (version $(shell uname -r))) + the current kernel (version $(KERNELRELEASE))) endif endif else @@ -106,7 +106,7 @@ ifeq ($(KERNELRELEASE),) # module install dir, only for current kernel ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),) ifndef MODULE_DIR - MODULE_DIR_TST := /lib/modules/$(shell uname -r) + MODULE_DIR_TST := /lib/modules/$(KERNELRELEASE) ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes) MODULE_DIR := $(MODULE_DIR_TST)/misc else