Clean up tools build
This MR aims to reduce the amount of custom and repeated logic in the files under debian/rules.d
.
- Remove the
clean
targets, which have been obsolete since thelinux-tools
source package was merged intolinux
. - Introduce and use the
srcdir
variable for upstream source directory. We need this value in many places and are currently writing it in a much longer way. - Split library and tools builds in
debian/rules.d/tools/thermal
into subdirectories. - Introduce and use variables for invoking upstream makefiles. These replace a lot of similar (but not identical) variable definitions that are currently used for invoking upstream non-Kbuild makefiles.
- Build user-space tools with Kbuild where possible. This does the same thing for most of the tools that can be built with Kbuild and removes duplicate rules from our makefiles.
- [x86] d/rules.d/tools/power/x86: Use upstream makefiles to build programs. This uses (3) to eliminate the need for duplicate definitions in our makefiles.
Edited by Ben Hutchings