]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Jan 2005 23:50:00 +0000 (23:50 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Jan 2005 23:50:00 +0000 (23:50 +0000)
not seem to work, assume it does set $(MAKE).
* doc/autoconf.texi (AC_PROG_MAKE_SET): Update.

ChangeLog
doc/autoconf.texi
lib/autoconf/programs.m4

index 4fa08b45c768f1e50e97c7378b25feb8bdbecf1a..d101d6fcb920933dcc4dcd60b0c6fe2d5e0c5a82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-04  Noah Misch  <noah@cs.caltech.edu>
+
+       * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does
+       not seem to work, assume it does set $(MAKE).
+       * doc/autoconf.texi (AC_PROG_MAKE_SET): Update.
+
 2005-01-03  Stepan Kasal  <kasal@ucw.cz>
 
        * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Add a comment about nesting.
index 0d58d0b685c14fe5def51086ffe174c5f6ae3297..203faa8522e2c33de7aa26298b254594deae4b12 100644 (file)
@@ -1835,9 +1835,10 @@ following macro allows you to use it even with those versions.
 @defmac AC_PROG_MAKE_SET
 @acindex{PROG_MAKE_SET}
 @ovindex SET_MAKE
-If @command{make} predefines the Make variable @code{MAKE}, define
-output variable @code{SET_MAKE} to be empty.  Otherwise, define
-@code{SET_MAKE} to contain @samp{MAKE=make}.  Calls @code{AC_SUBST} for
+If the Make command, @code{$MAKE} if set or else @samp{make}, predefines
+@code{$(MAKE)}, define output variable @code{SET_MAKE} to be empty.
+Otherwise, define @code{SET_MAKE} to a macro definition that sets
+@code{$(MAKE)}, such as @samp{MAKE=make}.  Calls @code{AC_SUBST} for
 @code{SET_MAKE}.
 @end defmac
 
index ee14f58db3298a78662e27b2c965fec447d34864..325d85bc934dca71f43ad5df12a5c56b275985ad 100644 (file)
@@ -2,7 +2,7 @@
 # Checking for programs.
 
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2004 Free Software Foundation, Inc.
+# 2002, 2004, 2005 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -672,7 +672,10 @@ fi
 
 # AC_PROG_MAKE_SET
 # ----------------
-# Define SET_MAKE to set ${MAKE} if make doesn't.
+# Define SET_MAKE to set ${MAKE} if Make does not do so automatically.  If Make
+# does not run the test Makefile, we assume that the Make program the user will
+# invoke does set $(MAKE).  This is typical, and emitting `MAKE=foomake' is
+# always wrong if `foomake' is not available or does not work.
 AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET])
 AN_PROGRAM([make], [AC_PROG_MAKE_SET])
 AC_DEFUN([AC_PROG_MAKE_SET],
@@ -682,11 +685,11 @@ AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
 [cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
-       @echo 'ac_maketemp="$(MAKE)"'
+       @echo 'ac_maketemp=X"$(MAKE)"'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
+if test "$ac_maketemp" != X ; then
   eval ac_cv_prog_make_${ac_make}_set=yes
 else
   eval ac_cv_prog_make_${ac_make}_set=no