]> Savannah Git Hosting - gnulib.git/commitdiff
gnu-make: Fix for NetBSD 8 'make'.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Oct 2018 11:56:42 +0000 (12:56 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 30 Oct 2018 11:58:22 +0000 (12:58 +0100)
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.

ChangeLog
m4/gnu-make.m4

index 7299a0da8b60778cf5390cf323f7090bbdcb969e..94f8e919fc2499d5d82566ee4b05a31f7aa58625 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-10-30  Bruno Haible  <bruno@clisp.org>
+
+       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.
+
 2018-10-28  Bernhard Voelker  <mail@bernhard-voelker.de>
 
        maintainer-makefile: fix syntax-check rule for "same.h"
index 1f833d96bc4d5794378818b3d84b140221be4203..507dad6ec8a0711ca5e5e35dceeeef2119b411cd 100644 (file)
 
 # 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])
 ])