Move internal functions.
This patch moves a few internal functions from definitions.mk
to two new files named definitions-utils.mk and definitions-host.mk.
Functions in definitions-utils.mk should be generic and not rely
on any global variables / environment variables / the file system.
This makes them trivial to test properly.
Functions in definitions-host.mk depends on the value of HOST_OS
and are really used to generate shell commands during the build.
definitions.mk still contains functions related to the build, e.g.
the module database.
+ Add three new utility functions, and corresponding tests:
filter-by
filter-out-by
find-first
They'll be used by functions defined in later patches.
Change-Id: I4d841fab74dd83a434a5c408f0b31d7847166d52
3 files changed