Reuben Thomas wrote: > Thanks for the change, which sounds good to me unless there's some other > GPL-licensed version of make (so it might mention "GNU General Public > License" in the output); it might be better explicitly to check the first > line of the output?
Indeed. Also, better minimize the risk brought in by translations. So, here's what I'm pushing: 2018-10-30 Bruno Haible <[email protected]> gnu-make: Fix for NetBSD 8 'make'. Reported by Reuben Thomas in <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>. * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version output, ignoring exit codes. diff --git a/m4/gnu-make.m4 b/m4/gnu-make.m4 index 1f833d9..507dad6 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]) ])
