Skip to content

Commit

Permalink
iproute2: Avoid unnecessary package rebuilds
Browse files Browse the repository at this point in the history
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 <cotequeiroz@gmail.com>
  • Loading branch information
cotequeiroz authored and nbd168 committed Nov 1, 2021
1 parent 93a42cf commit 4ea0cfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package/network/utils/iproute2/Makefile
Expand Up @@ -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))
Expand Down

0 comments on commit 4ea0cfe

Please sign in to comment.