diff --git a/kernel/busses/Module.mk b/kernel/busses/Module.mk index d225f53c..c034bd76 100644 --- a/kernel/busses/Module.mk +++ b/kernel/busses/Module.mk @@ -24,10 +24,12 @@ KERNELBUSSESDIR := $(MODULE_DIR) # Regrettably, even 'simply expanded variables' will not put their currently # defined value verbatim into the command-list of rules... # These targets are NOT included in 'mkpatch' ... -KERNELBUSSESTARGETS := \ - $(MODULE_DIR)/i2c-ali1535.o +KERNELBUSSESTARGETS := # These targets ARE included in 'mkpatch' ... +ifneq ($(shell if grep -q '^CONFIG_I2C_ALI1535=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-ali1535.o +endif ifneq ($(shell if grep -q '^CONFIG_I2C_ALI15X3=y' $(LINUX)/.config; then echo 1; fi),1) KERNELBUSSESTARGETS += $(MODULE_DIR)/i2c-ali15x3.o endif diff --git a/kernel/chips/Module.mk b/kernel/chips/Module.mk index 55f384c0..f0a9199d 100644 --- a/kernel/chips/Module.mk +++ b/kernel/chips/Module.mk @@ -24,18 +24,16 @@ KERNELCHIPSDIR := $(MODULE_DIR) # Regrettably, even 'simply expanded variables' will not put their currently # defined value verbatim into the command-list of rules... # These targets are NOT included in 'mkpatch' ... -KERNELCHIPSTARGETS := \ - $(MODULE_DIR)/adm1024.o \ - $(MODULE_DIR)/fscpos.o \ - $(MODULE_DIR)/it87.o \ - $(MODULE_DIR)/maxilife.o \ - $(MODULE_DIR)/mtp008.o +KERNELCHIPSTARGETS := # These targets ARE included in 'mkpatch', except for LTC1710, which we # leave here because it used to be in 'mkpatch' ... ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1021=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1021.o endif +ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1024=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1024.o +endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1025=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1025.o endif @@ -54,6 +52,9 @@ endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_EEPROM=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/eeprom.o endif +ifneq ($(shell if grep -q '^CONFIG_SENSORS_FSCPOS=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELCHIPSTARGETS += $(MODULE_DIR)/fscpos.o +endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_GL518SM=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/gl518sm.o endif @@ -81,6 +82,12 @@ endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_MATORB=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/matorb.o endif +ifneq ($(shell if grep -q '^CONFIG_SENSORS_MAXILIFE=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELCHIPSTARGETS += $(MODULE_DIR)/maxilife.o +endif +ifneq ($(shell if grep -q '^CONFIG_SENSORS_MTP008=y' $(LINUX)/.config; then echo 1; fi),1) +KERNELCHIPSTARGETS += $(MODULE_DIR)/mtp008.o +endif ifneq ($(shell if grep -q '^CONFIG_SENSORS_PCF8574=y' $(LINUX)/.config; then echo 1; fi),1) KERNELCHIPSTARGETS += $(MODULE_DIR)/pcf8574.o endif