mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-01 13:20:30 +00:00
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:
1 parent
ed8cbf315c
commit
688b2149dc
1 file changed
+5
-2
@@ -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 "***"
|
||||
|
||||
Reference in new issue
Block a user