GNU bug report logs - #13349
Could we just assume support for make recursive variable expansion unconditionally?

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Thu, 3 Jan 2013 18:56:02 UTC

Severity: wishlist

Full log


Message #46 received at 13349 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13349 <at> debbugs.gnu.org, "bug-autoconf <at> gnu.org" <bug-autoconf <at> gnu.org>,
	"automake-ng <at> gnu.org" <automake-ng <at> gnu.org>,
	Bob Friesenhahn <bfriesen <at> simple.dallas.tx.us>
Subject: Re: Re-execute with the "correct" make implementation
Date: Thu, 03 Jan 2013 16:31:28 -0700
[Message part 1 (text/plain, inline)]
On 01/03/2013 03:05 PM, Stefano Lattarini wrote:
>>>>
>>> Yeah, probably AM_INIT_AUTOMAKE should enhance the configure help message
>>> to report the "quirky" role of $MAKE (patches welcome).
>>
>> I'll think about an automake patch to make it precious (at this point,
>> I'm thinking that the use of MAKE is too closely tied to automake, and
>> that autoconf itself has no business in setting MAKE as precious, only
>> documenting in the generic INSTALL that MAKE is often important because
>> of automake).
>>
> Yes, this seems the best approach.

Then again, it is autoconf that defines AC_PROG_MAKE_SET which in turn
provides @SET_MAKE@ for substitution in Makefiles; so maybe autoconf
should be the one that lets $(MAKE) be precious after all.  Does this
(relatively untested) patch look like the right thing to do?

diff --git i/doc/autoconf.texi w/doc/autoconf.texi
index bb83443..67a862d 100644
--- i/doc/autoconf.texi
+++ w/doc/autoconf.texi
@@ -2208,7 +2208,7 @@ Output
 @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}.
+@code{SET_MAKE}, and also calls @code{AC_ARG_VAR} for @code{MAKE}.
 @end defmac

 If you use this macro, place a line like this in each @file{Makefile.in}
diff --git i/lib/autoconf/programs.m4 w/lib/autoconf/programs.m4
index f7af8b5..b6a8f78 100644
--- i/lib/autoconf/programs.m4
+++ w/lib/autoconf/programs.m4
@@ -813,10 +813,12 @@ fi
 # 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.
+# Calling this macro also marks $MAKE as a precious variable.
 AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET])
 AN_PROGRAM([make], [AC_PROG_MAKE_SET])
 AC_DEFUN([AC_PROG_MAKE_SET],
-[AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)])
+[AC_ARG_VAR([MAKE], [which program will run Makefiles (default make)])
+AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)])
 set x ${MAKE-make}
 ac_make=`AS_ECHO(["$[2]"]) | sed 's/+/p/g; s/[[^a-zA-Z0-9_]]/_/g'`
 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 12 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.