From: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2 of 4 v3] dependencies: check minimal make version early on
Date: Wed, 14 Dec 2011 15:22:08 +0100 [thread overview]
Message-ID: <d174ce85883c9e51f006.1323862798@devws108> (raw)
In-Reply-To: <patchbomb.1323862796@devws108>
Although support/dependencies/dependencies.sh 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/toolchain-buildroot.mk
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
include toolchain/toolchain-external.mk
else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
include toolchain/toolchain-crosstool-ng.mk
endif
This patch adds a check for the version of make very early in the Makefile, so
that old make versions are handled gracefully.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
Makefile | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,12 @@
# Set and export the version string
export BR2_VERSION:=2011.11-rc2
+# Check for minimal make version (note: this check will break at make 10.x)
+MIN_MAKE_VERSION=3.81
+ifeq (,$(filter $(MIN_MAKE_VERSION),$(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION)))))
+$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
+endif
+
# This top-level Makefile can *not* be executed in parallel
.NOTPARALLEL:
next prev parent reply other threads:[~2011-12-14 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 14:21 [Buildroot] [PATCH 0 of 4 v3] dependencies: some improvements Thomas De Schampheleire
2011-12-14 14:22 ` [Buildroot] [PATCH 1 of 4 v3] dependencies: move from toolchain/ to support/ Thomas De Schampheleire
2011-12-14 14:22 ` Thomas De Schampheleire [this message]
2011-12-14 14:25 ` [Buildroot] [PATCH 2 of 4 v3] dependencies: check minimal make version early on Thomas Petazzoni
2011-12-14 14:22 ` [Buildroot] [PATCH 3 of 4 v3] dependencies: add function suitable-host-package Thomas De Schampheleire
2011-12-14 14:29 ` Thomas Petazzoni
2011-12-14 14:22 ` [Buildroot] [PATCH 4 of 4 v3] dependencies: build a host-tar if no suitable tar can be found Thomas De Schampheleire
2011-12-14 14:29 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d174ce85883c9e51f006.1323862798@devws108 \
--to=patrickdepinguin+buildroot@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox