Fix depmod on non-running kernel version. Original patch from

Peter Breitenlohner.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3283 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-04-15 07:52:59 +00:00
1 parent ed8cbf315c
commit 688b2149dc
1 file changed
+5 -2
+5 -2
View File
@@ -82,7 +82,8 @@ CC := gcc
# This is the main modules directory into which the modules will be installed.
# The magic invocation will return something like this:
# /lib/modules/2.4.29
MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"')
KERNELVERSION := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"')
MODPREF := /lib/modules/$(KERNELVERSION)
# When building userspace for use with 2.4.x series kernels, we turn off
# sysfs support by default. You can override this (e.g. if you want
@@ -319,7 +320,9 @@ user_install::
all :: user
install :: all user_install
ifeq ($(DESTDIR),)
-/sbin/depmod -a
-if [ -r $(MODPREF)/build/System.map -a -x /sbin/depmod ] ; then \
/sbin/depmod -a -F $(MODPREF)/build/System.map $(KERNELVERSION) ; \
fi
else
@echo "*** This is a \`staged' install using \"$(DESTDIR)\" as prefix."
@echo "***"