diff options
authorThomas De Schampheleire <>2012-02-08 16:22:17 (GMT)
committer Peter Korsgaard <>2012-02-09 21:06:05 (GMT)
commit0edfb24c3840dd8df7cd69b8bdc3d4244334d2a1 (patch)
parenta792668b58fd5f551f30d40c2352f16011f1f92f (diff)
dependencies: check minimal make version early on
Although support/dependencies/ checks for the version of make, this script doesn't get a chance to run if make encounters a syntax error as a result of being too old. For example, the following syntax is only supported from make 3.81 onwards: ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) include toolchain/ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) include toolchain/ else ifeq ($(BR2_TOOLCHAIN_CTNG),y) include toolchain/ endif This patch adds a check for the version of make very early in the Makefile, so that old make versions are handled gracefully. [Peter: simplify check] Signed-off-by: Thomas De Schampheleire <> Acked-by: Thomas Petazzoni <> Signed-off-by: Peter Korsgaard <>
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 90d1a9d..2b228f7 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,12 @@
# Set and export the version string
export BR2_VERSION:=2012.02-git
+# Check for minimal make version (note: this check will break at make 10.x)
+ifeq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MAKE_VERSION))
+$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
# This top-level Makefile can *not* be executed in parallel