+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.
@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
# 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
# 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],
[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