From 00b094c7fa55cca08477cffe069ad8809683c0ea Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 25 Mar 2009 19:42:03 +0000 Subject: [PATCH] Patch from Ruben Laban : While writing DKMS support for the SCST and iSCST-SCST kernel modules, I ran into a (common) problem with regard to out-of-tree build detection. A common method to detect out-of-tree building is by using the KERNELRELEASE variable. The usage of this variable poses a problem when using DKMS. DKMS itself uses the KERNELRELEASE variable to specify the kernel for which the driver to build. A suggested alternative would to use the PATCHLEVEL variable as part of the detection mechanism instead. I attached a patch reflecting this suggested change. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@720 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- mpt/Makefile | 2 +- qla2x00t/Makefile | 2 +- qla2x00t/qla2x00-target/Makefile | 2 +- scst/src/Makefile | 2 +- scst/src/dev_handlers/Makefile | 2 +- scst_local/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mpt/Makefile b/mpt/Makefile index e9a36e576..f2cbd0b97 100644 --- a/mpt/Makefile +++ b/mpt/Makefile @@ -45,7 +45,7 @@ endif LSI_INC_DIR := $(KDIR)/drivers/message/fusion EXTRA_CFLAGS += -I$(LSI_INC_DIR) -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) obj-m += mpt_scst.o else diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index a8b968f0a..9d13c6a61 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -1,4 +1,4 @@ -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \ qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index 5e2995469..06c6bde8b 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -54,7 +54,7 @@ endif QLA2XXX_INC_DIR := $(KDIR)/drivers/scsi/qla2xxx EXTRA_CFLAGS += -I$(QLA2XXX_INC_DIR) -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) obj-m := qla2x00tgt.o qla2x00tgt-objs := qla2x00t.o diff --git a/scst/src/Makefile b/scst/src/Makefile index 87d843c9c..5ed35824f 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -29,7 +29,7 @@ DEV_HANDLERS_DIR = dev_handlers -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) SCST_INC_DIR := $(SUBDIRS)/../include obj-m := scst.o diff --git a/scst/src/dev_handlers/Makefile b/scst/src/dev_handlers/Makefile index af9f6db1c..2447a5879 100644 --- a/scst/src/dev_handlers/Makefile +++ b/scst/src/dev_handlers/Makefile @@ -27,7 +27,7 @@ # - install and uninstall must be made as root # -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) SCST_INC_DIR := $(SUBDIRS)/../include obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \ diff --git a/scst_local/Makefile b/scst_local/Makefile index 6966d16ec..727a86740 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -25,7 +25,7 @@ else KDIR := /lib/modules/$(KVER)/build endif -ifneq ($(KERNELRELEASE),) +ifneq ($(PATCHLEVEL),) obj-m := scst_local.o else