]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
Fix makefile include order by using sort/wildcard.
authorPeter Seiderer <ps.report@gmx.net>
Tue, 21 Nov 2017 19:13:30 +0000 (20:13 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 27 Nov 2017 10:05:51 +0000 (11:05 +0100)
commit8bb4b9c8dff6783557a8cda6507e2b4e613e5d8d
treeda0a375a935528d987194185960d79523ae871d3
parent3f8e8050d6ccd6c6bbac5d4d8019c39397557f54
Fix makefile include order by using sort/wildcard.

The 'include' directive in GNU make supports wildcards, but their
expansion has no defined sort order (GLOB_NOSORT is passed to glob()).
Usually this doesn't matter. However, there is at least one case where
it does make a difference: toolchain/*/*.mk includes both the
definitions of the external toolchain packages and
pkg-toolchain-external.mk, but pkg-toolchain-external.mk must be
included first.

For predictability, use ordered 'include $(sort $(wildcard ...))'
instead of unordered direct 'include */*.mk' everywhere.

Fixes [1] reported by Petr Vorel:

  make: *** No rule to make target 'toolchain-external-custom', needed by '.../build/toolchain-external/.stamp_configured'.  Stop.

[1] http://lists.busybox.net/pipermail/buildroot/2017-November/206969.html

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Tested-by: Petr Vorel <petr.vorel@gmail.com>
[Arnout: also sort the one remaining include, of the external docs]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit b9d2d4cb4ebc7a2290c4683dd9667b8f0a9e3cdf)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile
package/gstreamer/gstreamer.mk
package/gstreamer1/gstreamer1.mk
toolchain/toolchain-external/toolchain-external.mk