From e8a4f575c60fe71aefbcf55b01ded796734cc1c2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 11 Jun 2020 03:38:28 +0000 Subject: [PATCH] iscsi-scst, srpt: Fix run_conftest git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9010 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 12 ++++++++---- srpt/Makefile | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 9e3731144..c0d9d4b07 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -84,7 +84,7 @@ ifeq ($(OFED_FLAVOR),MOFED) -include $(OFED_DIR)/include/linux/compat-2.6.h \ -DMOFED_MAJOR=$(shell echo $(OFED_VERS) | cut -f1 -d.)\ -DMOFED_MINOR=$(shell echo $(OFED_VERS) | cut -f2 -d.) - ISER_SYMVERS:=$(ISER_SYMVERS) $(OFED_DIR)/$(MODULE_SYMVERS) + OFED_MODULE_SYMVERS:=$(OFED_DIR)/$(MODULE_SYMVERS) OFED_CONFIG:= CONFIG_DTRACE= else # Whether or not the OFED kernel-ib-devel RPM has been installed. @@ -98,17 +98,21 @@ else # BACKPORT_INCLUDES. include /usr/src/ofa_kernel/config.mk OFED_CFLAGS:=$(shell echo $(BACKPORT_INCLUDES) -I/usr/src/ofa_kernel/include) - ISER_SYMVERS:=$(ISER_SYMVERS) /usr/src/ofa_kernel/$(MODULE_SYMVERS) + OFED_MODULE_SYMVERS:=/usr/src/ofa_kernel/$(MODULE_SYMVERS) endif ifeq ($(OFED_COMPAT_RDMA_DEVEL_RPM_INSTALLED),true) OFED_CFLAGS:=-I/usr/src/compat-rdma/include -include /usr/src/compat-rdma/include/linux/compat-2.6.h - ISER_SYMVERS:=$(ISER_SYMVERS) /usr/src/compat-rdma/$(MODULE_SYMVERS) + OFED_MODULE_SYMVERS:=/usr/src/compat-rdma/$(MODULE_SYMVERS) endif endif +ifneq ($(OFED_MODULE_SYMVERS),) +ISER_SYMVERS:=$(ISER_SYMVERS) $(OFED_MODULE_SYMVERS) +endif + # Use make instead of $(MAKE) to get rid of command-line option -i -run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) +run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" $(OFED_CONFIG) 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0) CONFTESTS = $(shell ls -d conftest/*) diff --git a/srpt/Makefile b/srpt/Makefile index 837bef3a0..6e6609b32 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -82,7 +82,7 @@ OFED_MODULE_SYMVERS:=$(OFED_KERNEL_DIR)/$(MODULE_SYMVERS) endif # Use make instead of $(MAKE) to get rid of command-line option -i -run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" $(OFED_CONFIG) 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) +run_conftest = $(shell if [ "0$(V)" -gt 0 ]; then output=/dev/stdout; else output=/dev/null; fi; if MAKEFLAGS= make -C $(KDIR) V=$(V) M="$(shell pwd)/conftest/$1" PRE_CFLAGS="-Werror $(OFED_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(OFED_MODULE_SYMVERS)" $(OFED_CONFIG) 1>&2 2>$${output}; then echo "$(strip $2)"; else echo "$(strip $3)"; fi) run_conftest_bool = $(call run_conftest,$1,-D$(strip $2)=1,-D$(strip $2)=0) CONFTESTS = $(shell ls -d conftest/*)