[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Choose SET_MAKE correctly when there is no `make'
From: |
Noah Misch |
Subject: |
Re: Choose SET_MAKE correctly when there is no `make' |
Date: |
Tue, 4 Jan 2005 13:09:05 -0800 |
User-agent: |
Mutt/1.5.6i |
On Tue, Jan 04, 2005 at 11:49:08AM -0800, Paul Eggert wrote:
> Noah Misch <address@hidden> writes:
>
> > 2005-01-04 Noah Misch <address@hidden>
> >
> > * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does
> > not seem to work, assume it does set $(MAKE). Make `MAKE' precious.
> > * doc/autoconf.texi (AC_PROG_MAKE_SET): Update.
>
> That patch doesn't work for me. When I build and install autoconf
> with the patch (putting the installed Autoconf in my PATH), then do
> "rm aclocal.m4; make" in autoconf, it generates a "configure" script
> that doesn't work;
Oops. Thanks for catching that; I had not re-Automaked.
Let us omit the bit making `MAKE' precious. I'll need to add a way to make it
precious without substituting it, and that is a logically orthogonal patch. I
can make `MAKE' precious at that time.
This accomplishes as much as the last patch, save that folks who must specify
MAKE=foomake so Autoconf knows that foomake does not predefine $(MAKE) will
continue to lose on `./config.status --recheck'.
2005-01-04 Noah Misch <address@hidden>
* 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.
diff -urp -X dontdiff ac-clean/doc/autoconf.texi ac-setmake/doc/autoconf.texi
--- ac-clean/doc/autoconf.texi 2005-01-03 07:02:43.210621705 -0500
+++ ac-setmake/doc/autoconf.texi 2005-01-04 10:26:50.781630692 -0500
@@ -1835,9 +1835,10 @@ following macro allows you to use it eve
@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
address@hidden to contain @samp{MAKE=make}. Calls @code{AC_SUBST} for
+If the Make command, @code{$MAKE} if set or else @samp{make}, predefines
address@hidden(MAKE)}, define output variable @code{SET_MAKE} to be empty.
+Otherwise, define @code{SET_MAKE} to a macro definition that sets
address@hidden(MAKE)}, such as @samp{MAKE=make}. Calls @code{AC_SUBST} for
@code{SET_MAKE}.
@end defmac
diff -urp -X dontdiff ac-clean/lib/autoconf/programs.m4
ac-setmake/lib/autoconf/programs.m4
--- ac-clean/lib/autoconf/programs.m4 2005-01-02 12:39:22.000000000 -0500
+++ ac-setmake/lib/autoconf/programs.m4 2005-01-04 15:42:34.849584235 -0500
@@ -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}_
[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