autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more doc for `foo=bar make -e'


From: Alexandre Duret-Lutz
Subject: more doc for `foo=bar make -e'
Date: Wed, 15 Jan 2003 22:13:32 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

`env TESTS=bar make -e check' is better than
`make TESTS=bar check' when `check' is a recursive target.
This is already documented.

However there is a bug in GNU make that prevent `TESTS=bar make
-e check' to work when run *from* a Makefile rule.  It's ok to
type this on the command line or in a script, though.


2003-01-15  Alexandre Duret-Lutz  <address@hidden>

        * doc/autoconf.texi (Limitations of Make): `foo=bar make -e'
        is not portable inside Makefile.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.716
diff -u -r1.716 autoconf.texi
--- doc/autoconf.texi   3 Dec 2002 07:35:31 -0000       1.716
+++ doc/autoconf.texi   15 Jan 2003 20:39:05 -0000
@@ -10811,8 +10811,8 @@
 A command-line variable definition such as @code{foo=bar} overrides any
 definition of @code{foo} in the @file{Makefile}.  Some @command{make}
 implementations (such as @acronym{GNU} @command{make}) will propagate this
-override to sub-invocations of @command{make}.  This is allowed but not
-required by @acronym{POSIX}.
+override to sub-invocations of @command{make}.  Some other implementation
+will not pass the substitution along to address@hidden
 
 @example
 % @kbd{cat Makefile}
@@ -10849,9 +10849,16 @@
 invocations, the @code{foo} macro will be overridden in
 address@hidden as expected.
 
-Using @code{-e} could have unexpected side-effects if your environment
-contains some other macros usually defined by the Makefile.  (See
-also the note about @code{make -e} and @code{SHELL} below.)
+This syntax (@code{foo=bar make -e}) is portable only when used
+outside a @file{Makefile}, for instance from a script or from the
+command line.  When run inside a @command{make} rule, GNU
address@hidden 3.80 and prior versions forget to propagate the
address@hidden option to address@hidden
+
+Moreover, using @code{-e} could have unexpected side-effects if your
+environment contains some other macros usually defined by the
+Makefile.  (See also the note about @code{make -e} and @code{SHELL}
+below.)
 
 Another way to propagate overrides to address@hidden is to do it
 manually, from your @file{Makefile}:

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]