Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > 2c73492494c9944f1f3d2a89b9ac1562 > files > 5

virtualbox-1.5.2-5mdv2007.1.src.rpm

--- VirtualBox-1.5.2_OSE/src/VBox/HostDrivers/Support/linux/Makefile.kernelrelease	2007-10-18 13:07:28.000000000 +0200
+++ VirtualBox-1.5.2_OSE/src/VBox/HostDrivers/Support/linux/Makefile	2007-11-13 01:44:23.000000000 +0100
@@ -58,10 +58,15 @@ endif
 
 ifneq ($(MAKECMDGOALS),clean)
 
+# kernel version-release tag
+ifndef KERNELRELEASE
+  KERNELRELEASE := $(shell uname -r)
+endif
+
 # kernel base directory
 ifndef KERN_DIR
  # build for the current kernel, version check
- KERN_DIR := /lib/modules/$(shell uname -r)/build
+ 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)
@@ -94,7 +99,7 @@ endif
 # 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