diff mbox series

[2/4] Makefile: Require GNU make 3.82+

Message ID 20200822212129.97758-3-r.bolshakov@yadro.com (mailing list archive)
State New, archived
Headers show
Series Compatibility make fixes for meson | expand

Commit Message

Roman Bolshakov Aug. 22, 2020, 9:21 p.m. UTC
QEMU build fails with cryptic messages if make is too old:

  Makefile.ninja:2655: *** multiple target patterns.  Stop.

To avoid the confusion it's worth to fail the build right away and print
a friendly error message.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Daniel P. Berrangé Aug. 24, 2020, 2:32 p.m. UTC | #1
On Sun, Aug 23, 2020 at 12:21:27AM +0300, Roman Bolshakov wrote:
> QEMU build fails with cryptic messages if make is too old:
> 
>   Makefile.ninja:2655: *** multiple target patterns.  Stop.
> 
> To avoid the confusion it's worth to fail the build right away and print
> a friendly error message.
> 
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
>  Makefile | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Regards,
Daniel
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8373ddccc9..45d688b87b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,11 @@  ifneq ($(words $(subst :, ,$(CURDIR))), 1)
   $(error main directory cannot contain spaces nor colons)
 endif
 
+ifeq ($(filter undefine,$(value .FEATURES)),)
+$(error Unsupported Make version: $(MAKE_VERSION). \
+        Please use GNU Make 3.82 or above)
+endif
+
 # Always point to the root of the build tree (needs GNU make).
 BUILD_DIR=$(CURDIR)