Fix setting KERNEL_VERSION in modules makefile

Shell command evaluation should be performed using 'shell'
function. This fixes 'make install'.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2019-06-21 17:23:17 -04:00
parent f786f8419a
commit 59520a001c

View File

@ -20,7 +20,7 @@ VERSION_FILE=$(PWD)/CAS_VERSION
OCFDIR=$(PWD)/../ocf
KERNEL_DIR ?= "/lib/modules/$(shell uname -r)/build"
PWD=$(shell pwd)
KERNEL_VERSION := $(cd $KERNEL_DIR; make kernelversion)
KERNEL_VERSION := $(shell $(MAKE) -C $(KERNEL_DIR) --no-print-directory kernelversion)
MODULES_DIR=/lib/modules/$(KERNEL_VERSION)/extra
DISK_MODULE = cas_disk