Made ib_srpt easier to build on a multiboot system where multiple kernels
authorbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 11 Feb 2010 19:28:58 +0000 (19:28 +0000)
committerbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 11 Feb 2010 19:28:58 +0000 (19:28 +0000)
have been installed -- one kernel with OFED and one or more kernels without
OFED.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1498 d57e44dd-8a1f-0410-8b47-8ef2f437770f

srpt/Makefile

index 14713ae..146245b 100644 (file)
@@ -22,10 +22,10 @@ MODULE_SYMVERS:=$(shell if [ -e $(KDIR)/Module.symvers ]; then \
                       echo Module.symvers; else echo Modules.symvers; fi)
 
 # Whether or not the OFED kernel modules have been installed.
-OFED_KERNEL_IB_RPM_INSTALLED:=$(shell if rpm -q kernel-ib >/dev/null 2>&1; then echo true; else echo false; fi)
+OFED_KERNEL_IB_RPM_INSTALLED:=$(shell if rpm -q kernel-ib 2>/dev/null | grep -q $$(uname -r | sed 's/-/_/g'); then echo true; else echo false; fi)
 
 # Whether or not the OFED kernel-ib-devel RPM has been installed.
-OFED_KERNEL_IB_DEVEL_RPM_INSTALLED:=$(shell if rpm -q kernel-ib-devel >/dev/null 2>&1; then echo true; else echo false; fi)
+OFED_KERNEL_IB_DEVEL_RPM_INSTALLED:=$(shell if rpm -q kernel-ib-devel 2>/dev/null | grep -q $$(uname -r | sed 's/-/_/g'); then echo true; else echo false; fi)
 
 ifeq ($(OFED_KERNEL_IB_DEVEL_RPM_INSTALLED),true)
 # Read OFED's config.mk, which contains the definition of the variable