Changeset 575

Show
Ignore:
Timestamp:
09/23/99 01:11:52 (9 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:

Legend:

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

    r567 r575  
    3333 
    3434# Determine whether we need to compile the kernel modules, or only the 
    35 # user-space utilities. 
    36 COMPILE_KERNEL := $(shell if test -d $(LINUX)/drivers/sensors ; \ 
    37                           then echo 0; else echo 1; fi) 
     35# user-space utilities. By default, the kernel modules are compiled. 
    3836#COMPILE_KERNEL := 0 
    39 #COMPILE_KERNEL := 1 
     37COMPILE_KERNEL := 1 
    4038 
    4139# If you have installed the i2c header at some other place (like  
  • lm-sensors/trunk/kernel/Module.mk

    r496 r575  
    2323# Regrettably, even 'simply expanded variables' will not put their currently 
    2424# defined value verbatim into the command-list of rules... 
    25 KERNELTARGETS := $(MODULE_DIR)/sensors.o 
     25KERNELTARGETS :=  
     26ifneq ($(shell if grep -q '^CONFIG_SENSORS=y' $(LINUX)/.config; then echo 1; fi),1) 
     27KERNELTARGETS += $(MODULE_DIR)/sensors.o 
     28endif 
    2629 
    2730# Include all dependency files 
  • lm-sensors/trunk/kernel/busses/Module.mk

    r528 r575  
    2323# Regrettably, even 'simply expanded variables' will not put their currently 
    2424# defined value verbatim into the command-list of rules... 
    25 KERNELBUSSESTARGETS := $(MODULE_DIR)/i2c-piix4.o $(MODULE_DIR)/i2c-isa.o \ 
    26                        $(MODULE_DIR)/i2c-via.o $(MODULE_DIR)/i2c-ali15x3.o \ 
    27                        $(MODULE_DIR)/i2c-hydra.o $(MODULE_DIR)/i2c-voodoo3.o \ 
    28                        $(MODULE_DIR)/i2c-viapro.o $(MODULE_DIR)/i2c-i801.o 
    29  
    30 KERNELBUSSESOLD := bit-via.o bit-mb.o isa.o piix4.o 
     25KERNELBUSSESTARGETS := $(MODULE_DIR)/i2c-i801.o \ 
     26                       $(MODULE_DIR)/i2c-viapro.o \ 
     27                       $(MODULE_DIR)/i2c-voodoo3.o 
     28ifneq ($(shell if grep -q '^CONFIG_I2C_ALI15X3=y' $(LINUX)/.config; then echo 1; fi),1) 
     29KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-ali15x3.o 
     30endif 
     31ifneq ($(shell if grep -q '^CONFIG_I2C_HYDRA=y' $(LINUX)/.config; then echo 1; fi),1) 
     32KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-hydra.o 
     33endif 
     34ifneq ($(shell if grep -q '^CONFIG_I2C_ISA=y' $(LINUX)/.config; then echo 1; fi),1) 
     35KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-isa.o 
     36endif 
     37ifneq ($(shell if grep -q '^CONFIG_I2C_PIIX4=y' $(LINUX)/.config; then echo 1; fi),1) 
     38KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-piix4.o 
     39endif 
     40ifneq ($(shell if grep -q '^CONFIG_I2C_VIA=y' $(LINUX)/.config; then echo 1; fi),1) 
     41KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-via.o 
     42endif 
    3143 
    3244# Include all dependency files 
     
    3749 
    3850install-kernel-busses: all-kernel-busses 
    39         $(RM) $(addprefix $(MODDIR)/,$(KERNELBUSSESOLD)) 
    4051        $(MKDIR) $(MODDIR)  
    4152        $(INSTALL) -o root -g root -m 644 $(KERNELBUSSESTARGETS) $(MODDIR) 
  • 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 
  • lm-sensors/trunk/kernel/include/Module.mk

    r496 r575  
    2121MODULE_DIR := kernel/include 
    2222 
    23 KERNELINCLUDEFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/i2c-isa.h  
    24                        
     23KERNELINCLUDEFILES :=  
     24ifneq ($(shell if grep -q '^CONFIG_SENSORS=y' $(LINUX)/.config; then echo 1; fi),1) 
     25KERNELINCLUDEFILES += $(MODULE_DIR)/sensors.h 
     26endif 
     27ifneq ($(shell if grep -q '^CONFIG_I2C_ISA=y' $(LINUX)/.config; then echo 1; fi),1) 
     28KERNELINCLUDEFILES += $(MODULE_DIR)/isa.h 
     29endif 
    2530 
    2631install-all-kernel-include: