diff --git a/Makefile b/Makefile index 19a32b50..d640af5f 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,7 @@ FLEX := flex AR := ar INSTALL := install LN := ln -sfn +GREP := grep # Determine the default compiler flags # MODCFLAGS is to create in-kernel object files (modules); PROGFLAGS is to diff --git a/kernel/include/Module.mk b/kernel/include/Module.mk index d9ba0e77..ea66c227 100644 --- a/kernel/include/Module.mk +++ b/kernel/include/Module.mk @@ -20,10 +20,21 @@ # verbatim in the rules, until it is redefined. MODULE_DIR := kernel/include -KERNELINCLUDEHEADERFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ - $(MODULE_DIR)/smbus.h $(MODULE_DIR)/i2c-dev.h +KERNELINCLUDEFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ + $(MODULE_DIR)/smbus.h $(MODULE_DIR)/i2c-dev.h install-all-kernel-include: $(MKDIR) $(SYSINCLUDEDIR) - $(INSTALL) -o root -g root -m 644 $(SRCHEADERFILES) $(SYSINCLUDEDIR) + for file in $(KERNELINCLUDEFILES) ; do \ + $(RM) $$file.install; \ + $(GREP) -v '/\* TBD \*/' $$file > $$file.install; \ + $(INSTALL) -o root -g root -m 644 $$file.install \ + $(SYSINCLUDEDIR)/`basename $$file`; \ + $(RM) $$file.install; \ + done install :: install-all-kernel-include + +clean-all-kernel-include: + $(RM) $(KERNELINCLUDEFILES:.h=.h.install) + +clean :: clean-all-kernel-include diff --git a/kernel/include/i2c-dev.h b/kernel/include/i2c-dev.h index cd35f7fe..7bbbc793 100644 --- a/kernel/include/i2c-dev.h +++ b/kernel/include/i2c-dev.h @@ -18,16 +18,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Important note: */ /* TBD */ +/* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ +/* WILL BE DELETED when this file is installed. */ /* TBD */ +/* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ + #ifndef SENSORS_I2C_DEV_H #define SENSORS_I2C_DEV_H -#ifdef LM_SENSORS -#include "i2c.h" -#include "smbus.h" -#else /* ndef LM_SENSORS */ +#ifdef LM_SENSORS /* TBD */ +#include "i2c.h" /* TBD */ +#include "smbus.h" /* TBD */ +#else /* ndef LM_SENSORS */ /* TBD */ #include #include -#endif /* def LM_SENSORS */ +#endif /* def LM_SENSORS */ /* TBD */ #include diff --git a/kernel/include/i2c-isa.h b/kernel/include/i2c-isa.h index df8bb5ff..e5a91f90 100644 --- a/kernel/include/i2c-isa.h +++ b/kernel/include/i2c-isa.h @@ -18,6 +18,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Important note: */ /* TBD */ +/* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ +/* WILL BE DELETED when this file is installed. */ /* TBD */ +/* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ + + #ifndef SENSORS_SENSOR_H #define SENSORS_SENSOR_H @@ -36,11 +42,11 @@ #include #endif -#ifdef LM_SENSORS -#include "i2c.h" -#else /* ndef LM_SENSORS */ +#ifdef LM_SENSORS /* TBD */ +#include "i2c.h" /* TBD */ +#else /* ndef LM_SENSORS */ /* TBD */ #include -#endif /* def LM_SENSORS */ +#endif /* def LM_SENSORS */ /* TBD */ /* Note that this driver is *not* built upon smbus.c, but is parallel to it. We do not need SMBus facilities if we are on the ISA bus, after all */ diff --git a/kernel/include/i2c.h b/kernel/include/i2c.h index 644565c5..5d1c6a12 100644 --- a/kernel/include/i2c.h +++ b/kernel/include/i2c.h @@ -18,7 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - /* This is a stub files, that either includes (the kernel header) or "i2c/i2c.h" (the header in the i2c directory). */ diff --git a/kernel/include/isa.h b/kernel/include/isa.h index df8bb5ff..e5a91f90 100644 --- a/kernel/include/isa.h +++ b/kernel/include/isa.h @@ -18,6 +18,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Important note: */ /* TBD */ +/* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ +/* WILL BE DELETED when this file is installed. */ /* TBD */ +/* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ + + #ifndef SENSORS_SENSOR_H #define SENSORS_SENSOR_H @@ -36,11 +42,11 @@ #include #endif -#ifdef LM_SENSORS -#include "i2c.h" -#else /* ndef LM_SENSORS */ +#ifdef LM_SENSORS /* TBD */ +#include "i2c.h" /* TBD */ +#else /* ndef LM_SENSORS */ /* TBD */ #include -#endif /* def LM_SENSORS */ +#endif /* def LM_SENSORS */ /* TBD */ /* Note that this driver is *not* built upon smbus.c, but is parallel to it. We do not need SMBus facilities if we are on the ISA bus, after all */ diff --git a/kernel/include/sensors.h b/kernel/include/sensors.h index 83a18aa2..a7547cde 100644 --- a/kernel/include/sensors.h +++ b/kernel/include/sensors.h @@ -18,6 +18,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Important note: */ /* TBD */ +/* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ +/* WILL BE DELETED when this file is installed. */ /* TBD */ +/* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ + + #ifndef SENSORS_SENSORS_H #define SENSORS_SENSORS_H diff --git a/kernel/include/smbus.h b/kernel/include/smbus.h index e3f7b1dc..077ed087 100644 --- a/kernel/include/smbus.h +++ b/kernel/include/smbus.h @@ -18,6 +18,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Important note: */ /* TBD */ +/* Lines like these, with the 'TBD' remark (To Be Deleted) */ /* TBD */ +/* WILL BE DELETED when this file is installed. */ /* TBD */ +/* This allows us to get rid of the ugly LM_SENSORS define */ /* TBD */ + #ifndef SENSORS_SMBUS_H #define SENSORS_SMBUS_H @@ -56,11 +61,11 @@ union smbus_data { #include #endif -#ifdef LM_SENSORS -#include "i2c.h" -#else +#ifdef LM_SENSORS /* TBD */ +#include "i2c.h" /* TBD */ +#else /* TBD */ #include -#endif +#endif /* TBD */ /* Declarations, to keep the compiler happy */ struct smbus_driver;