[packages] triggerhappy: fix determination of input.h, remove explicit override ...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 6 Mar 2011 17:26:48 +0000 (17:26 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 6 Mar 2011 17:26:48 +0000 (17:26 +0000)
SVN-Revision: 25890

utils/triggerhappy/Makefile
utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch [new file with mode: 0644]

index 2f22fb1..e81d03e 100644 (file)
@@ -32,7 +32,6 @@ define Package/triggerhappy/description
 endef
 
 MAKE_FLAGS += \
-       LINUX_INPUT_H=$(TOOLCHAIN_DIR)/usr/include/linux/input.h \
        $(TARGET_CONFIGURE_OPTS) \
        $(1)
 
diff --git a/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch b/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch
new file mode 100644 (file)
index 0000000..13ecd8c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -10,7 +10,7 @@ THCMD_COMPS := th-cmd cmdsocket
+ MAKEDEPEND = $(CC) -M -MG $(CPPFLAGS) -o $*.d $<
+-LINUX_INPUT_H := $(shell echo '\#include <linux/input.h>' | $(CC) $(CPPFLAGS) -M -E - | awk 'NR==1 {print $$2}')
++LINUX_INPUT_H := $(shell for i in `echo | $(CC) $(CPPFLAGS) -M -E -include 'linux/input.h' -`; do test -f "$$i" && echo "$$i" && break; done)
+ all: thd th-cmd man