From 9806075ee240c3ea8dcbf804991450dfb09fac02 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 02:59:42 +0000 Subject: [PATCH] Merge r7362 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7622 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srpt/Makefile b/srpt/Makefile index c9047e9ed..eabc70bbd 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -72,12 +72,12 @@ ifeq ($(OFED_FLAVOR),MOFED) # header files use the LINUX_BACKPORT() macro without including # , include that header file explicitly. OFED_KERNEL_DIR:=/usr/src/ofa_kernel/default -OFED_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null; dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms) +OFED_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null | grep -v ' '; dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms 2>/dev/null) OFED_CFLAGS:=-I$(OFED_KERNEL_DIR)/include \ -I$(OFED_KERNEL_DIR)/include/uapi \ -include "linux/compat-2.6.h" -OFED_CFLAGS+=-DMOFED_MAJOR=$(shell echo $(OFED_VERS) | cut -f1 -d.) -OFED_CFLAGS+=-DMOFED_MINOR=$(shell echo $(OFED_VERS) | cut -f2 -d.) +OFED_CFLAGS+=-DMOFED_MAJOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\1/g') +OFED_CFLAGS+=-DMOFED_MINOR=$(shell echo "$(OFED_VERS)" | sed 's/\([0-9]\+\)[^0-9]\+\([0-9]\+\).*/\2/g') else # OFED 1.5 OFED_KERNEL_DIR:=/usr/src/ofa_kernel