Author: nbd
Date: 2016-01-18 14:21:32 +0100 (Mon, 18 Jan 2016)
New Revision: 48314

Modified:
   trunk/package/network/utils/iptables/Makefile
Log:
iptables: fix rebuild errors on configuration changes

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/package/network/utils/iptables/Makefile
===================================================================
--- trunk/package/network/utils/iptables/Makefile       2016-01-18 12:47:36 UTC 
(rev 48313)
+++ trunk/package/network/utils/iptables/Makefile       2016-01-18 13:21:32 UTC 
(rev 48314)
@@ -448,6 +448,20 @@
        KBUILD_OUTPUT="$(LINUX_DIR)" \
        BUILTIN_MODULES="$(patsubst ip6t_%,%,$(patsubst ipt_%,%,$(patsubst 
xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m))))"
 
+ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),$(subst 
.configured_,.config_,$(STAMP_CONFIGURED)))
+  define Build/Configure/rebuild
+       $(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.\?o -or -name \*.a | 
$(XARGS) rm -f
+       rm -f $(PKG_BUILD_DIR)/.config_*
+       rm -f $(PKG_BUILD_DIR)/.configured_*
+       touch $(subst .configured_,.config_,$(STAMP_CONFIGURED))
+  endef
+endif
+
+define Build/Configure
+$(Build/Configure/rebuild)
+$(Build/Configure/Default)
+endef
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_DIR) $(1)/usr/include/iptables
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to