From cf909e3e1625bd5b246e4f35f2e41e66c00e71eb Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 19 Jul 2020 00:00:49 +0000 Subject: [PATCH] Makefiles: If both KDIR and KVER have been set, preserve KDIR git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9052 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/Makefile | 4 +++- iscsi-scst/Makefile | 4 +++- qla2x00t-32gbit/Makefile | 4 +++- qla2x00t-32gbit/qla2x00-target/Makefile | 4 +++- qla2x00t/Makefile | 4 +++- qla2x00t/qla2x00-target/Makefile | 4 +++- scst/src/Makefile | 4 +++- scst/src/dev_handlers/Makefile | 4 +++- scst_local/Makefile | 4 +++- srpt/Makefile | 4 +++- 10 files changed, 30 insertions(+), 10 deletions(-) diff --git a/fcst/Makefile b/fcst/Makefile index ac6e640d4..ab7a71f4d 100644 --- a/fcst/Makefile +++ b/fcst/Makefile @@ -46,7 +46,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 6c488c141..9302197ba 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -34,7 +34,9 @@ ifeq ($(KVER),) endif endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/qla2x00t-32gbit/Makefile b/qla2x00t-32gbit/Makefile index 2cc88c31f..dd4f889cc 100644 --- a/qla2x00t-32gbit/Makefile +++ b/qla2x00t-32gbit/Makefile @@ -35,7 +35,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/qla2x00t-32gbit/qla2x00-target/Makefile b/qla2x00t-32gbit/qla2x00-target/Makefile index 94598660a..e541e9da3 100644 --- a/qla2x00t-32gbit/qla2x00-target/Makefile +++ b/qla2x00t-32gbit/qla2x00-target/Makefile @@ -44,7 +44,9 @@ ifeq ($(KVER),) endif endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index 0dce532fa..ce1ba74c6 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -34,7 +34,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index d6f3f0888..89c239c25 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -43,7 +43,9 @@ ifeq ($(KVER),) endif endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/scst/src/Makefile b/scst/src/Makefile index 240a6061d..d611cb71f 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -45,7 +45,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/scst/src/dev_handlers/Makefile b/scst/src/dev_handlers/Makefile index bddc1a87f..f6c2242ab 100644 --- a/scst/src/dev_handlers/Makefile +++ b/scst/src/dev_handlers/Makefile @@ -39,7 +39,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/scst_local/Makefile b/scst_local/Makefile index 5dba991dc..22273223a 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -20,7 +20,9 @@ ifeq ($(KVER),) make -s -C $(KDIR) kernelversion)) endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),) diff --git a/srpt/Makefile b/srpt/Makefile index d96d6df9b..1d2da90c1 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -22,7 +22,9 @@ ifeq ($(KVER),) endif endif else - KDIR := /lib/modules/$(KVER)/build + ifeq ($(KDIR),) + KDIR := /lib/modules/$(KVER)/build + endif endif ifeq ($(INSTALL_MOD_PATH),)