mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 05:06:31 +00:00
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:
+3
-2
@@ -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:
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user