Changeset 3283

Show
Ignore:
Timestamp:
04/15/06 09:52:59 (3 years ago)
Author:
khali
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/Makefile

    r3259 r3283  
    8383# The magic invocation will return something like this: 
    8484#   /lib/modules/2.4.29 
    85 MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') 
     85KERNELVERSION := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"') 
     86MODPREF := /lib/modules/$(KERNELVERSION) 
    8687 
    8788# When building userspace for use with 2.4.x series kernels, we turn off 
     
    320321install :: all user_install 
    321322ifeq ($(DESTDIR),) 
    322         -/sbin/depmod -a 
     323        -if [ -r $(MODPREF)/build/System.map -a -x /sbin/depmod ] ; then \ 
     324          /sbin/depmod -a -F $(MODPREF)/build/System.map $(KERNELVERSION) ; \ 
     325        fi 
    323326else 
    324327        @echo "*** This is a \`staged' install using \"$(DESTDIR)\" as prefix."