From 28098428d3d371a238837f338739283cf19dc650 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 30 Oct 2018 12:56:42 +0100 Subject: [PATCH] gnu-make: Fix for NetBSD 8 'make'. Reported by Reuben Thomas in . * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version output, ignoring exit codes. --- ChangeLog | 8 ++++++++ m4/gnu-make.m4 | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7299a0da8b..94f8e919fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-10-30 Bruno Haible + + gnu-make: Fix for NetBSD 8 'make'. + Reported by Reuben Thomas in + . + * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version + output, ignoring exit codes. + 2018-10-28 Bernhard Voelker maintainer-makefile: fix syntax-check rule for "same.h" diff --git a/m4/gnu-make.m4 b/m4/gnu-make.m4 index 1f833d96bc..507dad6ec8 100644 --- a/m4/gnu-make.m4 +++ b/m4/gnu-make.m4 @@ -10,10 +10,8 @@ # Set GNU_MAKE if we are using a recent-enough version of GNU make. -# Use --version AND trailing junk, because SGI Make doesn't fail on --version. - AC_DEFUN([gl_GNU_MAKE], [ AM_CONDITIONAL([GNU_MAKE], - [${MAKE-make} --version /cannot/make/this >/dev/null 2>&1]) + [LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null]) ]) -- 2.39.5