mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-13 10:24:42 +00:00
Stuff to get rid of the LM_SENSORS define
Until now, all installed include files depended on a #defined variable LM_SENSORS: if it was defined, other files were included as "somefile.h" instead of <linux/somefile.h>. This was clearly dangerous, and is fixed now, by automatically deleting the offending lines from the include file when it is installed. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@180 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user