From 8c4889d092aed023ee9a3ef163c2a3a01d2636ad Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 14 Apr 2017 21:38:56 +0000 Subject: [PATCH] iscsi-scst/Makefile: Fix detection of whether InfiniBand is enabled Inspecting modules.symbols is fine after a kernel has been installed but not if a kernel tree has not been installed. If a kernel tree has not been installed, check the .config file. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7131 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 5a83d7516..9827cac51 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -55,7 +55,7 @@ ifeq ($(INSTALL_MOD_PATH),) endif INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra -INFINIBAND_ENABLED = $(shell if grep -wq 'ib_register_client' $$(dirname "$(KDIR)")/modules.symbols; then echo true; else echo false; fi) +INFINIBAND_ENABLED = $(shell syms=$$(dirname "$(KDIR)")/modules.symbols; if [ -e "$$syms" ] && grep -wq 'ib_register_client' "$$syms" || grep -q "^CONFIG_INFINIBAND=[my]$$" "$(KDIR)/.config"; then echo true; else echo false; fi) all: progs mods