Show
Ignore:
Timestamp:
09/23/99 01:11:52 (14 years ago)
Author:
frodo
Message:

Makefile changes for better behaviour with already patched kernels.

The Makefile now examine $(LINUX)/.config to see what modules need to be
compiled. It compiles only those modules which were either not configured
in at all, or were built as modules (ie. drivers which are built-in in the
kernel are not built, as they can not be overruled).

The above is still potentially dangerous, if we break the interface of
our modules. Still, it is much better than it was.
C

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/Module.mk

    r560 r575  
    2323# Regrettably, even 'simply expanded variables' will not put their currently 
    2424# defined value verbatim into the command-list of rules... 
    25 KERNELCHIPSTARGETS := $(MODULE_DIR)/adm1021.o $(MODULE_DIR)/adm9240.o \ 
    26                       $(MODULE_DIR)/eeprom.o $(MODULE_DIR)/gl518sm.o \ 
    27                       $(MODULE_DIR)/lm75.o $(MODULE_DIR)/lm78.o \ 
    28                       $(MODULE_DIR)/lm80.o $(MODULE_DIR)/ltc1710.o \ 
    29                       $(MODULE_DIR)/w83781d.o $(MODULE_DIR)/sis5595.o \ 
    30                       $(MODULE_DIR)/maxilife.o $(MODULE_DIR)/bt869.o \ 
    31                       $(MODULE_DIR)/matorb.o $(MODULE_DIR)/gl520sm.o \ 
     25KERNELCHIPSTARGETS := $(MODULE_DIR)/bt869.o $(MODULE_DIR)/gl520sm.o \ 
     26                      $(MODULE_DIR)/matorb.o $(MODULE_DIR)/maxilife.o \ 
    3227                      $(MODULE_DIR)/thmc50.o 
     28ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1021=y' $(LINUX)/.config; then echo 1; fi),1) 
     29KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1021.o 
     30endif 
     31ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM9240=y' $(LINUX)/.config; then echo 1; fi),1) 
     32KERNELCHIPSTARGETS += $(MODULE_DIR)/adm9240.o 
     33endif 
     34ifneq ($(shell if grep -q '^CONFIG_SENSORS_EEPROM=y' $(LINUX)/.config; then echo 1; fi),1) 
     35KERNELCHIPSTARGETS += $(MODULE_DIR)/eeprom.o 
     36endif 
     37ifneq ($(shell if grep -q '^CONFIG_SENSORS_GL518SM=y' $(LINUX)/.config; then echo 1; fi),1) 
     38KERNELCHIPSTARGETS += $(MODULE_DIR)/gl518sm.o 
     39endif 
     40ifneq ($(shell if grep -q '^CONFIG_SENSORS_LM75=y' $(LINUX)/.config; then echo 1; fi),1) 
     41KERNELCHIPSTARGETS += $(MODULE_DIR)/lm75.o 
     42endif 
     43ifneq ($(shell if grep -q '^CONFIG_SENSORS_LM78=y' $(LINUX)/.config; then echo 1; fi),1) 
     44KERNELCHIPSTARGETS += $(MODULE_DIR)/lm78.o 
     45endif 
     46ifneq ($(shell if grep -q '^CONFIG_SENSORS_LM80=y' $(LINUX)/.config; then echo 1; fi),1) 
     47KERNELCHIPSTARGETS += $(MODULE_DIR)/lm80.o 
     48endif 
     49ifneq ($(shell if grep -q '^CONFIG_SENSORS_LTC1710=y' $(LINUX)/.config; then echo 1; fi),1) 
     50KERNELCHIPSTARGETS += $(MODULE_DIR)/ltc1710.o 
     51endif 
     52ifneq ($(shell if grep -q '^CONFIG_SENSORS_SIS5595=y' $(LINUX)/.config; then echo 1; fi),1) 
     53KERNELCHIPSTARGETS += $(MODULE_DIR)/sis5595.o 
     54endif 
     55ifneq ($(shell if grep -q '^CONFIG_SENSORS_W83781D=y' $(LINUX)/.config; then echo 1; fi),1) 
     56KERNELCHIPSTARGETS += $(MODULE_DIR)/w83781d.o 
     57endif 
    3358 
    3459# Include all dependency files