Makefile: handle host packages for make source / make external-deps
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 19 Nov 2010 13:20:56 +0000 (14:20 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 19 Nov 2010 13:20:56 +0000 (14:20 +0100)
commit22c2c6b5410fdf2fcb617faa7ccff904328d142d
tree262e93fc5fb31af9ac7953b6da2bf421085dd969
parent0826a822b9519fbd5aebf9f7d12d88832b3ddb22
Makefile: handle host packages for make source / make external-deps

Ensure host packages (dependencies of target packages) are also handled
by make source / make external-deps.

This has to be done a explicitly, as we don't list these in Kconfig,
and hence also not in a variable like TARGETS, so instead we have to
look at the <PKG>_DEPENDENCIES variables for each enabled package and
extract the host packages from there.

Host packages can in turn also have dependencies, so we have to follow
those as well. Ideally this should be done recursively, but as that's
pretty hard to do in make, it is limited to 1 level for now.

Finally, host packages share source files with target packages, so
pipe output of make external-deps through sort -u to ensure duplicates
are removed.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile