Changeset 4029

Show
Ignore:
Timestamp:
04/15/06 09:33:53 (2 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
  • i2c/trunk/Makefile

    r3989 r4029  
    6262# The magic invocation will return something like this: 
    6363#   /lib/modules/2.4.29 
    64 MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') 
     64KERNELVERSION := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"') 
     65MODPREF := /lib/modules/$(KERNELVERSION) 
    6566 
    6667# Prevent 2.6+ users from using this package, as this won't work. 
     
    212213install :: all 
    213214ifeq ($(DESTDIR),) 
    214         -/sbin/depmod -a 
     215        -if [ -r $(MODPREF)/build/System.map -a -x /sbin/depmod ] ; then \ 
     216          /sbin/depmod -a -F $(MODPREF)/build/System.map $(KERNELVERSION) ; \ 
     217        fi 
    215218else 
    216219        @echo "*** This is a \`staged' install using \"$(DESTDIR)\" as prefix."