mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
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. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5018 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
6b58796daf
commit
2ae24a97ed
3 files changed
+10
-8
No files matched your search
@@ -3,6 +3,7 @@ lm_sensors CHANGES file
|
||||
|
||||
SVN-HEAD
|
||||
Library: Fix fschrc and fschmd support
|
||||
Makefile: Revert changeset 4738, fix bug #2187 differently
|
||||
Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding
|
||||
Update manufacturer IDs.
|
||||
Program sensors: Hide spurious errors on missing f71872f voltage inputs
|
||||
|
||||
@@ -83,10 +83,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
|
||||
ifneq (,$(findstring /2.4., /$(KERNELVERSION)))
|
||||
UTSRELEASE := $(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release | cut -f 2 -d'"')
|
||||
MODPREF := /lib/modules/$(UTSRELEASE)
|
||||
endif
|
||||
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
|
||||
@@ -94,7 +92,7 @@ endif
|
||||
# by uncommenting the line after the next endif. Keep in mind, if and only
|
||||
# if you do this: you will need to install the libsysfs libraries on your
|
||||
# kernel 2.4.x systems also.
|
||||
ifeq (,$(findstring /2.4., /$(KERNELVERSION)))
|
||||
ifeq (,$(findstring /2.4., $(MODPREF)))
|
||||
SYSFS_SUPPORT := 1
|
||||
else
|
||||
SYSFS_SUPPORT :=
|
||||
@@ -102,7 +100,7 @@ endif
|
||||
#SYSFS_SUPPORT := 1
|
||||
|
||||
# Prevent 2.6+ users from using improper targets, as this won't work.
|
||||
ifeq (,$(findstring /2.4., /$(KERNELVERSION)))
|
||||
ifeq (,$(findstring /2.4., $(MODPREF)))
|
||||
ifeq (, $(MAKECMDGOALS))
|
||||
$(error For 2.6 kernels and later, use "make user")
|
||||
endif
|
||||
@@ -322,7 +320,7 @@ all :: user
|
||||
install :: all user_install
|
||||
ifeq ($(DESTDIR),)
|
||||
-if [ -r $(MODPREF)/build/System.map -a -x /sbin/depmod ] ; then \
|
||||
/sbin/depmod -a -F $(MODPREF)/build/System.map $(UTSRELEASE) ; \
|
||||
/sbin/depmod -a -F $(MODPREF)/build/System.map $(KERNELVERSION) ; \
|
||||
fi
|
||||
else
|
||||
@echo "*** This is a \`staged' install using \"$(DESTDIR)\" as prefix."
|
||||
|
||||
+4
-1
@@ -5,7 +5,10 @@
|
||||
* that contain multiple UTS_RELEASE definitions in version.h.
|
||||
*
|
||||
* Note: since kernel 2.6.17, the definition of UTS_RELEASE has
|
||||
* moved to <linux/utsrelease.h> so this no longer works.
|
||||
* moved to <linux/utsrelease.h>.
|
||||
*/
|
||||
#include <linux/version.h>
|
||||
#ifndef UTS_RELEASE
|
||||
#include <linux/utsrelease.h>
|
||||
#endif
|
||||
char *uts_release=UTS_RELEASE;
|
||||
Reference in new issue
Block a user