mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
Detect 2.6+ kernels and check targets. Original patch by Jim
Cromie. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3045 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
53df3c69b8
commit
7daaa8bcda
1 file changed
+10
@@ -86,6 +86,16 @@ CC := gcc
|
||||
# /lib/modules/2.4.29
|
||||
MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"')
|
||||
|
||||
# Prevent 2.6+ users from using improper targets, as this won't work.
|
||||
ifeq (,$(findstring /2.4., $(MODPREF)))
|
||||
ifeq (, $(MAKECMDGOALS))
|
||||
$(error For 2.6 kernels and later, use "make user")
|
||||
endif
|
||||
ifeq (install, $(MAKECMDGOALS))
|
||||
$(error For 2.6 kernels and later, use "make user_install")
|
||||
endif
|
||||
endif
|
||||
|
||||
# This is the directory where sensors.conf will be installed, if no other
|
||||
# configuration file is found
|
||||
ETCDIR := /etc
|
||||
|
||||
Reference in new issue
Block a user