aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iptables/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-18 13:21:32 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-18 13:21:32 +0000
commita484e79b1ede7e686d957ecd02c94543d9c0131f (patch)
treefc169306d4c11759e4ddb84d86e4f75a59ce6c0b /package/network/utils/iptables/Makefile
parenta1807d3f52d6d7054de81b5f9efe3fcbdb29edbb (diff)
downloadmaster-187ad058-a484e79b1ede7e686d957ecd02c94543d9c0131f.tar.gz
master-187ad058-a484e79b1ede7e686d957ecd02c94543d9c0131f.tar.bz2
master-187ad058-a484e79b1ede7e686d957ecd02c94543d9c0131f.zip
iptables: fix rebuild errors on configuration changes
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48314 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iptables/Makefile')
-rw-r--r--package/network/utils/iptables/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index 626b252761..e5bca40c7e 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -448,6 +448,20 @@ MAKE_FLAGS := \
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