From 03c41d05e371df60d4e1fa0f9f6eef79a4feb737 Mon Sep 17 00:00:00 2001 From: Evgenii Shatokhin Date: Fri, 16 Feb 2018 13:18:28 +0300 Subject: [PATCH] kmod/core: fix definition of KERNELRELEASE A cosmetic fix. If KPATCH_BUILD ending with 'build/' is passed to 'make', KERNELRELEASE will become 'build' and the error message will look like: "<...> doesn't exist. Try installing the kernel-devel-build RPM or linux-headers-build DEB." Let us fix that. Signed-off-by: Evgenii Shatokhin --- kmod/core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/core/Makefile b/kmod/core/Makefile index 3a01339..93e8490 100644 --- a/kmod/core/Makefile +++ b/kmod/core/Makefile @@ -1,6 +1,6 @@ # make rules KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build -KERNELRELEASE := $(lastword $(subst /, , $(dir $(KPATCH_BUILD)))) +KERNELRELEASE := $(lastword $(subst /, , $(dir $(patsubst %/,%,$(KPATCH_BUILD))))) THISDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) ifeq ($(wildcard $(KPATCH_BUILD)),)