Changeset 3045

Show
Ignore:
Timestamp:
07/24/05 17:41:02 (3 years ago)
Author:
khali
Message:

Detect 2.6+ kernels and check targets. Original patch by Jim

Cromie.

Files:

Legend:

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

    r2935 r3045  
    8686#   /lib/modules/2.4.29 
    8787MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') 
     88 
     89# Prevent 2.6+ users from using improper targets, as this won't work. 
     90ifeq (,$(findstring /2.4., $(MODPREF))) 
     91    ifeq (, $(MAKECMDGOALS)) 
     92        $(error For 2.6 kernels and later, use "make user") 
     93    endif 
     94    ifeq (install, $(MAKECMDGOALS)) 
     95        $(error For 2.6 kernels and later, use "make user_install") 
     96    endif 
     97endif 
    8898 
    8999# This is the directory where sensors.conf will be installed, if no other