[coreboot] buildrom

Peter Stuge peter at stuge.se
Wed May 21 12:44:24 CEST 2008


On Wed, May 21, 2008 at 09:34:21AM +0200, Peter Stuge wrote:
> > You need at least make version 3.80 (released in 2002), which
> > introduced 'order-only prerequisites'. Your copy of make is choking
> > on order-only prerequisites.
> 
> Nice research, Ward!
> 
> Is there some way we can detect make version in the Makefile and
> teach it this knowledge, allowing for a friendly error message?

Here's a hacky rule that will do the check when bash is $SHELL.
Please improve it any way you can. Maybe there are some predefined
variables with the make version we can use instead?

If people like it I could make a patch.


.PHONY: versioncheck

versioncheck:
        @ echo GNU make 3.79.1 | \
                (read g m v; \
                vmaj=$${v/.*}; vaftmaj=$${v#*.}; vmin=$${vaftmaj%%.*}; \
                test $$vmaj -lt 3 -o $$vmin -lt 80 && \
                echo "Sorry, you need GNU make version 3.80 or newer. (found: $${v})" && \
                exit 1; exit 0)


//Peter




More information about the coreboot mailing list