Fixed depmod to work for the necessary kernel, not the current one

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2007-04-03 14:49:33 +00:00
parent 3c1cf6c033
commit 0733627b2c
4 changed files with 14 additions and 10 deletions
+3 -2
View File
@@ -21,7 +21,8 @@ obj-$(CONFIG_SCSI_QLA24XX) += qla2xxx.o qla2400.o
else
ifeq ($(KVER),)
ifeq ($(KDIR),)
KDIR := /lib/modules/$(shell uname -r)/build
KVER = $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif
else
KDIR := /lib/modules/$(KVER)/build
@@ -36,7 +37,7 @@ install: all
uninstall:
rm -f $(INSTALL_DIR)/qla2[2-3]00.ko $(INSTALL_DIR)/qla2xxx.ko
-/sbin/depmod -a
-/sbin/depmod -a $(KVER)
endif
clean:
+4 -3
View File
@@ -42,7 +42,8 @@ EXTRA_CFLAGS += -DDEBUG_TGT -g
ifeq ($(KVER),)
ifeq ($(KDIR),)
KDIR := /lib/modules/$(shell uname -r)/build
KVER = $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif
else
KDIR := /lib/modules/$(KVER)/build
@@ -66,7 +67,7 @@ tgt: Modules.symvers Module.symvers
install: all
$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_INI=m \
modules_install
-depmod -a
-depmod -a $(KVER)
SCST_MOD_VERS := $(shell ls $(SCST_DIR)/Modules.symvers 2>/dev/null)
ifneq ($(SCST_MOD_VERS),)
@@ -87,7 +88,7 @@ endif
uninstall:
rm -f $(INSTALL_DIR)/qla2[23x]00tgt.ko
-/sbin/depmod -a
-/sbin/depmod -a $(KVER)
endif
clean:
+4 -3
View File
@@ -47,7 +47,8 @@ obj-$(BUILD_DEV) += $(DEV_HANDLERS_DIR)/
else
ifeq ($(KVER),)
ifeq ($(KDIR),)
KDIR := /lib/modules/$(shell uname -r)/build
KVER = $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif
else
KDIR := /lib/modules/$(KVER)/build
@@ -77,13 +78,13 @@ ifneq ($(MOD_VERS),)
rm -f $(INSTALL_DIR_H)/Modules.symvers
install -m 644 Module.symvers $(INSTALL_DIR_H)
endif
-depmod -a
-depmod -a $(KVER)
uninstall:
cd $(DEV_HANDLERS_DIR) && $(MAKE) $@
rm -f $(INSTALL_DIR)/scsi_tgt.ko
-rmdir $(INSTALL_DIR) 2>/dev/null
-/sbin/depmod -a
-/sbin/depmod -a $(KVER)
rm -rf $(INSTALL_DIR_H)
endif
+3 -2
View File
@@ -43,7 +43,8 @@ obj-$(CONFIG_SCSI_TARGET_VDISK) += scst_vdisk.o
else
ifeq ($(KDIR),)
KDIR := /lib/modules/$(shell uname -r)/build
KVER = $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif
all:
@@ -52,7 +53,7 @@ all:
install: all
$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) \
modules_install
-depmod -a
-depmod -a $(KVER)
uninstall:
rm -f $(INSTALL_DIR)/scst_*.ko