mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 14:16:31 +00:00
scst/src/Makefile: Make "make install" without prior "make" work
Avoid that MOD_VERS and MODS_VERS evaluate to an empty string.
Reported-by: Yan Burman <yanb@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5808 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+6
-11
@@ -95,9 +95,10 @@ all: $(SCST_INTF_VER_FILE)
|
||||
scst:
|
||||
$(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_DEV=n
|
||||
|
||||
MODS_VERS := $(shell ls Modules.symvers 2>/dev/null)
|
||||
# It's renamed in 2.6.18
|
||||
MOD_VERS := $(shell ls Module.symvers 2>/dev/null)
|
||||
# The file Modules.symvers has been renamed in the 2.6.18 kernel to
|
||||
# Module.symvers. Find out which name to use by looking in $(KDIR).
|
||||
MODULE_SYMVERS:=$(shell if [ -e $(KDIR)/Module.symvers ]; then \
|
||||
echo Module.symvers; else echo Modules.symvers; fi)
|
||||
|
||||
install: all
|
||||
@if [ -z "$(DESTDIR)" ] && \
|
||||
@@ -116,14 +117,8 @@ install: all
|
||||
install -m 644 ../include/scst_user.h $(INSTALL_DIR_H)
|
||||
install -m 644 ../include/scst_const.h $(INSTALL_DIR_H)
|
||||
install -m 644 ../include/scst_itf_ver.h $(INSTALL_DIR_H)
|
||||
ifneq ($(MODS_VERS),)
|
||||
rm -f $(INSTALL_DIR_H)/Module.symvers
|
||||
install -m 644 Modules.symvers $(INSTALL_DIR_H)
|
||||
endif
|
||||
ifneq ($(MOD_VERS),)
|
||||
rm -f $(INSTALL_DIR_H)/Modules.symvers
|
||||
install -m 644 Module.symvers $(INSTALL_DIR_H)
|
||||
endif
|
||||
rm -f $(INSTALL_DIR_H)/$(MODULE_SYMVERS)
|
||||
install -m 644 $(MODULE_SYMVERS) $(INSTALL_DIR_H)
|
||||
-/sbin/depmod -b $(INSTALL_MOD_PATH)/ -a $(KVER)
|
||||
mkdir -p $(DESTDIR)/var/lib/scst/pr
|
||||
mkdir -p $(DESTDIR)/var/lib/scst/vdev_mode_pages
|
||||
|
||||
Reference in New Issue
Block a user