From f6371c5d5e0d540980b8f0a4dd6393da09339286 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 15 Sep 2019 00:29:55 +0000 Subject: [PATCH] Makefiles: Run depmod also on Ubuntu systems after module installation Fixes: e902f79ecf4d ("kernel module installation: Skip "depmod" when building an RPM"; r5612) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8582 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/Makefile | 4 ++-- ibmvstgt/Makefile | 4 ++-- iscsi-scst/Makefile | 12 ++++++------ mpt/Makefile | 4 ++-- mvsas_tgt/Makefile | 4 ++-- qla2x00t-32gbit/Makefile | 4 ++-- qla2x00t-32gbit/qla2x00-target/Makefile | 4 ++-- qla2x00t/Makefile | 4 ++-- qla2x00t/qla2x00-target/Makefile | 4 ++-- scst-dkms.spec.in | 2 +- scst.spec.in | 2 +- scst/src/Makefile | 3 ++- scst/src/dev_handlers/Makefile | 4 ++-- scst_local/Makefile | 4 ++-- srpt/Makefile | 2 +- 15 files changed, 31 insertions(+), 30 deletions(-) diff --git a/fcst/Makefile b/fcst/Makefile index 4920c4f46..76812370c 100644 --- a/fcst/Makefile +++ b/fcst/Makefile @@ -74,8 +74,8 @@ tgt: $(MODULE_SYMVERS) $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=n install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install ins: diff --git a/ibmvstgt/Makefile b/ibmvstgt/Makefile index 54fa01502..51dc24dae 100644 --- a/ibmvstgt/Makefile +++ b/ibmvstgt/Makefile @@ -37,8 +37,8 @@ all: src/$(MODULE_SYMVERS) $(MAKE) -C $(KDIR) M=$(shell pwd)/src modules install: all src/ibmvstgt.ko - $(MAKE) -C $(KDIR) M=$(shell pwd)/src \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd)/src \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index d3717c6b7..cfb6f9aef 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -149,14 +149,14 @@ install: all @install -vD -m 644 doc/manpages/iscsi-scstd.8 $(DESTDIR)$(MANDIR)/man8/iscsi-scstd.8 @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) M=$(KMOD) \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(KMOD) \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" - if $(INFINIBAND_ENABLED); then \ - $(MAKE) -C $(KDIR) M=$(ISERTMOD) \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ - modules_install; \ + if $(INFINIBAND_ENABLED); then \ + $(MAKE) -C $(KDIR) M=$(ISERTMOD) \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ + modules_install; \ fi uninstall: diff --git a/mpt/Makefile b/mpt/Makefile index 2350ea246..977c49851 100644 --- a/mpt/Makefile +++ b/mpt/Makefile @@ -73,8 +73,8 @@ tgt: Modules.symvers Module.symvers $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=n install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ 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 aec055510..a10eb31a5 100644 --- a/mvsas_tgt/Makefile +++ b/mvsas_tgt/Makefile @@ -88,8 +88,8 @@ tgt: Modules.symvers Module.symvers $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=n install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install ins: diff --git a/qla2x00t-32gbit/Makefile b/qla2x00t-32gbit/Makefile index 293599e20..989beec9f 100644 --- a/qla2x00t-32gbit/Makefile +++ b/qla2x00t-32gbit/Makefile @@ -62,8 +62,8 @@ all: $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/qla2x00t-32gbit/qla2x00-target/Makefile b/qla2x00t-32gbit/qla2x00-target/Makefile index 0a4228bae..1b40554f4 100644 --- a/qla2x00t-32gbit/qla2x00-target/Makefile +++ b/qla2x00t-32gbit/qla2x00-target/Makefile @@ -101,8 +101,8 @@ install: all ifneq ($(BUILD_2X_MODULE),) $(MAKE) M=$(QLA2XXX_DIR) -C $(QLA2XXX_DIR) $@ endif - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index 6a5298b39..fa524ba3e 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -59,8 +59,8 @@ all: $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index 8e675464b..38f48b73a 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -100,8 +100,8 @@ install: all ifneq ($(BUILD_2X_MODULE),) $(MAKE) M=$(QLA2XXX_DIR) -C $(QLA2XXX_DIR) $@ endif - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/scst-dkms.spec.in b/scst-dkms.spec.in index 204dc4a5b..67e5527cd 100644 --- a/scst-dkms.spec.in +++ b/scst-dkms.spec.in @@ -115,7 +115,7 @@ for d in scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do done %install -export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} +export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} DEPMOD=true export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y for d in scst; do DESTDIR=%{buildroot} %{make} -C $d install diff --git a/scst.spec.in b/scst.spec.in index c1ca942ed..bc3ce3269 100644 --- a/scst.spec.in +++ b/scst.spec.in @@ -125,7 +125,7 @@ for d in qla2x00t_git/qla2x00-target qla2x00t/qla2x00-target; do done %install -export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} +export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} DEPMOD=true %{?kdir:%{expand:%%(export KDIR=%{kdir})}} export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y for d in scst; do diff --git a/scst/src/Makefile b/scst/src/Makefile index 3b2c699af..e7e7356b1 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -128,9 +128,10 @@ install: all false; fi -rm -f $(INSTALL_DIR)/scsi_tgt.ko $(MAKE) -C $(KDIR) M=$(shell pwd)/dev_handlers \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true)\ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install install -d $(INSTALL_DIR_H) header_files="backport.h scst.h scst_const.h scst_debug.h \ diff --git a/scst/src/dev_handlers/Makefile b/scst/src/dev_handlers/Makefile index 789eab1e9..e07722eb5 100644 --- a/scst/src/dev_handlers/Makefile +++ b/scst/src/dev_handlers/Makefile @@ -65,8 +65,8 @@ all: install: all mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages - $(MAKE) -C $(KDIR) M=$(shell pwd) \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: diff --git a/scst_local/Makefile b/scst_local/Makefile index 1684088ed..cbbd462a9 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -51,8 +51,8 @@ all: $(MODULE_SYMVERS) $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m install: all - $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $(MAKE) -C $(KDIR) M=$(shell pwd) BUILD_INI=m \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install $(MODULE_SYMVERS): $(SCST_DIR)/$(MODULE_SYMVERS) diff --git a/srpt/Makefile b/srpt/Makefile index acd2fcc9f..de5a49e3e 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -109,7 +109,7 @@ install: all find /lib/modules/$(KVER) -name ib_srpt.ko -exec rm {} \; ; \ true $(MAKE) -C $(KDIR) M=$(shell pwd)/src PRE_CFLAGS="$(PRE_CFLAGS)" \ - $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ + $$([ -n "$(DEPMOD)" ] && echo "DEPMOD=$(DEPMOD)") \ modules_install uninstall: