changeset 29168:3c62738a76e6

New module gnu-make, for determining whether we're using GNU Make. * m4/gnu-make.m4: New file. * modules/gnu-make: New file. * MODULES.html.sh: Mention new module.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 15 Nov 2007 15:52:13 -0800
parents 6854c12d6398
children 63a90edf2f8b
files ChangeLog MODULES.html.sh m4/gnu-make.m4 modules/gnu-make
diffstat 4 files changed, 55 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 14 13:33:21 2007 +0100
+++ b/ChangeLog	Thu Nov 15 15:52:13 2007 -0800
@@ -1,3 +1,10 @@
+2007-11-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	New module gnu-make, for determining whether we're using GNU Make.
+	* m4/gnu-make.m4: New file.
+	* modules/gnu-make: New file.
+	* MODULES.html.sh: Mention new module.
+
 2007-11-14  Jim Meyering  <meyering@redhat.com>
 
 	Define a sometimes-link-required function using ARGMATCH_DIE_DECL.
--- a/MODULES.html.sh	Wed Nov 14 13:33:21 2007 +0100
+++ b/MODULES.html.sh	Thu Nov 15 15:52:13 2007 -0800
@@ -2728,6 +2728,7 @@
   func_echo "$element"
 
   func_begin_table
+  func_module gnu-make
   func_module host-os
   func_module perl
   func_module uptime
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gnu-make.m4	Thu Nov 15 15:52:13 2007 -0800
@@ -0,0 +1,19 @@
+# Determine whether recent-enough GNU Make is being used.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+# 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])
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/gnu-make	Thu Nov 15 15:52:13 2007 -0800
@@ -0,0 +1,28 @@
+Description:
+Determine whether recent-enough GNU Make is being used.
+
+Files:
+m4/gnu-make.m4
+
+Depends-on:
+
+configure.ac:
+gl_GNU_MAKE
+
+Makefile.am:
+##Sample usage of gnu-make module:
+#if GNU_MAKE
+#	[nicer features that work only with GNU Make]
+#else
+#	[fallback features that work in any 'make' implementation; see
+#	http://www.opengroup.org/susv3/utilities/make.html
+#	for the 2004 POSIX specification]
+#endif
+
+Include:
+
+License:
+GPL
+
+Maintainer:
+Paul Eggert