[Buildroot] RFC dependencies: checking minimum make version

Peter Korsgaard jacmet at uclibc.org
Thu Dec 1 19:07:29 UTC 2011


>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> writes:

Hi,

 Thomas> 2. Check for the make version in make instead of in shell, e.g. with
 Thomas> the following pattern: (adopted from
 Thomas> http://www.jgc.org/blog/cookbook-sample.pdf)
 Thomas> need := 3.81
 Thomas> ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
 Thomas> ifeq (,$(ok))
 Thomas> $(error make too old!)
 Thomas> endif

 Thomas> This will not work when make 10.x comes out because of the sort trick,
 Thomas> but otherwise should work fine. This code should be included as early
 Thomas> as possible in the Makefile.

 Thomas> What do you think?

The likelyhood of people using <3.81 is probably getting fairly small,
but I'm OK with such a test (with a better error message and variables
though) at the top of the main Makefile.

Out of interest, on what system did you hit this?

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list