diff options
author | Martin Roth <martinroth@chromium.org> | 2016-08-10 16:40:02 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-12 13:45:32 -0700 |
commit | 88428882b827b818df9b99ca37ef26b8f1927e9a (patch) | |
tree | 617853b27d2dc7b263a826f5b8fbcb7d2f5f8aec | |
parent | 0b16cd761a374c37a64192d07f85ab610496844a (diff) | |
download | chrome-ec-88428882b827b818df9b99ca37ef26b8f1927e9a.tar.gz |
Makefile.toolchain: Add error if make version will not build the EC
If you try to build the EC codebase with GNU make version 3.81 or
less, you currently get an error:
Makefile.rules:286: *** multiple target patterns. Stop.
Since this message isn't helpful in letting you know that the version
of make needs to be updated, let's print something more useful.
ERROR: GNU make version 3.82 or higher required. Stop.
TEST=Built with Make 3.81 and saw the new error message. Built with
make 3.82 and 4.0 and the EC built correctly.
BRANCH=None
BUG=None
Change-Id: I5813fd26fa8120742544567c5ae04af01f993f94
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/367944
Reviewed-by: David Hendricks <dhendrix@chromium.org>
-rw-r--r-- | Makefile.toolchain | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index 4fbba39a14..015701b6e4 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -8,6 +8,13 @@ # Toolchain configuration +min_make_version:=3.82 +make_version_ok:=$(filter $(min_make_version), \ + $(firstword $(sort $(MAKE_VERSION) $(min_make_version)))) +ifeq ($(make_version_ok),) +$(error ERROR: GNU make version $(min_make_version) or higher required.) +endif + # Try not to assume too much about optional tools and prefixes CCACHE:=$(shell which ccache 2>/dev/null) ifeq ($(origin HOST_CROSS_COMPILE),undefined) |