Changeset 5018

Show
Ignore:
Timestamp:
11/12/07 14:43:50 (6 years ago)
Author:
khali
Message:

Makefile: Revert changeset 4738, fix bug #2187 differently. The original
fix was breaking the build for non-current kernels, or at least making it
more difficult than before.

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5015 r5018  
    44SVN-HEAD 
    55  Library: Fix fschrc and fschmd support 
     6  Makefile: Revert changeset 4738, fix bug #2187 differently 
    67  Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding 
    78                           Update manufacturer IDs. 
  • lm-sensors/trunk/Makefile

    r4738 r5018  
    8484# The magic invocation will return something like this: 
    8585#   /lib/modules/2.4.29 
    86 ifneq (,$(findstring /2.4., /$(KERNELVERSION))) 
    87         UTSRELEASE := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"') 
    88         MODPREF := /lib/modules/$(UTSRELEASE) 
    89 endif 
     86KERNELVERSION := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"') 
     87MODPREF := /lib/modules/$(KERNELVERSION) 
    9088 
    9189# When building userspace for use with 2.4.x series kernels, we turn off 
     
    9593# if you do this: you will need to install the libsysfs libraries on your 
    9694# kernel 2.4.x systems also. 
    97 ifeq (,$(findstring /2.4., /$(KERNELVERSION))) 
     95ifeq (,$(findstring /2.4., $(MODPREF))) 
    9896        SYSFS_SUPPORT := 1 
    9997else 
     
    103101 
    104102# Prevent 2.6+ users from using improper targets, as this won't work. 
    105 ifeq (,$(findstring /2.4., /$(KERNELVERSION))) 
     103ifeq (,$(findstring /2.4., $(MODPREF))) 
    106104    ifeq (, $(MAKECMDGOALS)) 
    107105        $(error For 2.6 kernels and later, use "make user") 
     
    323321ifeq ($(DESTDIR),) 
    324322        -if [ -r $(MODPREF)/build/System.map -a -x /sbin/depmod ] ; then \ 
    325           /sbin/depmod -a -F $(MODPREF)/build/System.map $(UTSRELEASE) ; \ 
     323          /sbin/depmod -a -F $(MODPREF)/build/System.map $(KERNELVERSION) ; \ 
    326324        fi 
    327325else 
  • lm-sensors/trunk/etc/config.c

    r4738 r5018  
    66 * 
    77 * Note: since kernel 2.6.17, the definition of UTS_RELEASE has 
    8  * moved to <linux/utsrelease.h> so this no longer works. 
     8 * moved to <linux/utsrelease.h>. 
    99 */ 
    1010#include <linux/version.h> 
     11#ifndef UTS_RELEASE 
     12#include <linux/utsrelease.h> 
     13#endif 
    1114char *uts_release=UTS_RELEASE;