improve resiliency and efficiency of tools Makefile #600
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the
tools/Makefileto make the build process for various tools more robust, maintainable, and efficient. The changes introduce reusable repository targets, standardized options forwgetandgit clone, and ensure idempotent builds for both x86_64 and aarch64 architectures. The Makefile now avoids redundant downloads and builds, and provides clearer structure for future maintenance.Key improvements include:
Build Process Refactoring and Idempotency
dmidecode-repo,ethtool-repo, etc.) and changed tool targets to copy from these repos, avoiding repeated downloads and enabling idempotent builds. Now, tools are only rebuilt if their binaries are missing. [1] [2] [3]Download and Clone Options Standardization
WGET_OPTSandGIT_CLONE_OPTSvariables to standardize retry logic, timeouts, and shallow clone behavior for all downloads and git clones, improving reliability and speed. Applied these options throughout the Makefile. [1] [2] [3]Version Handling and Consistency
Architecture Support and Static Builds
Miscellaneous Improvements
.PHONYtargets for better Makefile hygiene and parallelization.These changes collectively make the build system more reliable, maintainable, and easier for future contributors to understand and extend.