From cd84bd33e143f93a501afa8f5f2c293a0cd6e5af Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:41:46 +0800 Subject: [PATCH] iproute2: Avoid unnecessary package rebuilds (#8163) Build the tc-mod-iptables before the tc-tiny and tc-full packages. This avoids unnecessary package rebuild when calling make back to back. Before this change, tc-mod-iptables will be built after the main tc binary packages. Both tc-tiny and tc-full depend on tc-mod-ipables. If make is called after the packages are already built, it will check the timestamps of both packages, and will rebuild the main binaries, since the module package will be newer than the tc package. Calling BuildPackage,mod-iptables first ensures that its variant gets built before the other packages' variants. Signed-off-by: Eneas U de Queiroz Co-authored-by: Eneas U de Queiroz --- package/network/utils/iproute2/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index cfcdb8cc5..ca3cb4753 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -232,9 +232,11 @@ endef $(eval $(call BuildPackage,ip-tiny)) $(eval $(call BuildPackage,ip-full)) +# build tc-mod-iptables before its dependents, to avoid +# spurious rebuilds when building multiple variants. +$(eval $(call BuildPackage,tc-mod-iptables)) $(eval $(call BuildPackage,tc-tiny)) $(eval $(call BuildPackage,tc-full)) -$(eval $(call BuildPackage,tc-mod-iptables)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) $(eval $(call BuildPackage,ss))