From c7155f7254ced6562cf85ddf71fb359ca8022157 Mon Sep 17 00:00:00 2001 From: bvassche Date: Thu, 19 Jun 2014 12:48:25 +0000 Subject: [PATCH] kernel module installation: Skip "depmod" when building an RPM --- fcst/Makefile | 1 + ibmvstgt/Makefile | 4 +++- iscsi-scst/Makefile | 1 + mpt/Makefile | 1 + mvsas_tgt/Makefile | 1 + qla2x00t/Makefile | 1 + qla2x00t/qla2x00-target/Makefile | 1 + qla_isp/linux-2.6/Makefile | 4 +++- scst/src/dev_handlers/Makefile | 1 + scst_local/Makefile | 1 + srpt/Makefile | 1 + 11 files changed, 15 insertions(+), 2 deletions(-) diff --git a/fcst/Makefile b/fcst/Makefile index 5939c958..1200bcb7 100644 --- a/fcst/Makefile +++ b/fcst/Makefile @@ -86,6 +86,7 @@ tgt: Modules.symvers Module.symvers install: all $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ SCST_INC_DIR=$(SCST_INC_DIR) modules_install ins: diff --git a/ibmvstgt/Makefile b/ibmvstgt/Makefile index daaf57f4..2bc8ce12 100644 --- a/ibmvstgt/Makefile +++ b/ibmvstgt/Makefile @@ -38,7 +38,9 @@ all: src/$(MODULE_SYMVERS) $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/src modules install: all src/ibmvstgt.ko - $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/src modules_install + $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/src \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + modules_install uninstall: rm -f $(INSTALL_DIR)/libsrp.ko $(INSTALL_DIR)/ibmvstgt.ko diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 05cf4f69..405a63cd 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -70,6 +70,7 @@ install: all @install -vD -m 755 usr/iscsi-scst-adm $(DESTDIR)$(SBINDIR)/iscsi-scst-adm @install -vD -m 644 doc/manpages/iscsi-scst-adm.8 $(DESTDIR)$(MANDIR)/man8/iscsi-scst-adm.8 $(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(KMOD) \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install uninstall: diff --git a/mpt/Makefile b/mpt/Makefile index 957c39a1..f75c7376 100644 --- a/mpt/Makefile +++ b/mpt/Makefile @@ -74,6 +74,7 @@ tgt: Modules.symvers Module.symvers install: all $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install SCST_MOD_VERS := $(shell ls $(SCST_DIR)/Modules.symvers 2>/dev/null) diff --git a/mvsas_tgt/Makefile b/mvsas_tgt/Makefile index 5b4db8d9..30af5476 100644 --- a/mvsas_tgt/Makefile +++ b/mvsas_tgt/Makefile @@ -89,6 +89,7 @@ tgt: Modules.symvers Module.symvers install: all $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install ins: diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index ac628ce9..b1651b06 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -61,6 +61,7 @@ all: install: all $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install uninstall: diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index 7dbbf011..67aacf8a 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -105,6 +105,7 @@ ifneq ($(BUILD_2X_MODULE),) SCST_INC_DIR=$(SCST_INC_DIR) endif $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ SCST_INC_DIR=$(SCST_INC_DIR) modules_install uninstall: diff --git a/qla_isp/linux-2.6/Makefile b/qla_isp/linux-2.6/Makefile index d363d4bb..8a3fdd83 100644 --- a/qla_isp/linux-2.6/Makefile +++ b/qla_isp/linux-2.6/Makefile @@ -52,7 +52,9 @@ extraclean: clean rm -f *.orig *.rej install: - @$(MAKE) -C ${LINUX} M=${CURDIR}/build modules_install + @$(MAKE) -C ${LINUX} M=${CURDIR}/build \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + modules_install install_host_progs: @$(MAKE) -C build $@ diff --git a/scst/src/dev_handlers/Makefile b/scst/src/dev_handlers/Makefile index 464ff06d..f3f8b960 100644 --- a/scst/src/dev_handlers/Makefile +++ b/scst/src/dev_handlers/Makefile @@ -73,6 +73,7 @@ all: install: all mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install uninstall: diff --git a/scst_local/Makefile b/scst_local/Makefile index 2dee7552..7eba6e43 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -61,6 +61,7 @@ all: Modules.symvers Module.symvers install: all $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ SCST_INC_DIR=$(SCST_INC_DIR) modules_install SCST_MOD_VERS := $(shell ls $(SCST_DIR)/Modules.symvers 2>/dev/null) diff --git a/srpt/Makefile b/srpt/Makefile index 4a4c2efd..7c21d6e4 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -94,6 +94,7 @@ all: src/$(MODULE_SYMVERS) install: all src/ib_srpt.ko $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/src \ PRE_CFLAGS="$(OFED_CFLAGS)" SCST_INC_DIR=$(SCST_INC_DIR) \ + $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install uninstall: