automake
[Top][All Lists]
Advanced

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

Re: Problem with dejagnu.am


From: Mark Mitchell
Subject: Re: Problem with dejagnu.am
Date: 24 Aug 2003 14:54:28 -0700

On Sat, 2003-08-23 at 03:22, Alexandre Duret-Lutz wrote:
> >>> "Mark" == Mark Mitchell <address@hidden> writes:
> 
>  Mark> In dejagnu.am there is:
> 
>  Mark> ## Flags for DejaGNU.
>  Mark> RUNTESTFLAGS =
> 
>  Mark> As far as I can tell, all that does is:
> 
>  Mark> (a) Make for confusion if the Makefile.am sets that variable
>  Mark> elsewhere, and
> 
> Any setting in Makefile.am overrides the default setting
> supplied by Automake.  This applies to all variables and almost
> all rules in Automake.  Although RUNTESTFLAGS should normally
> not be overridden (grep the doc for AM_RUNTESTFLAGS) I don't
> expect a problem with that.  If there is one, it's certainly a
> bug elsewhere.
> 
>  Mark> (b) Prevent users from setting the value in the environment.
> 
> Similar variables (ETAGSFLAGS, CTAGSFLAGS, and JAVACFLAGS) are
> defined this way.  This has always puzzled me and I believe the
> point is precisely to have environment independent builds, at
> least I can't think of any other.  Maybe Tom can shed some light
> on this, since he actually defined all of these variables
> consistently: each time FOOFLAGS is defined empty and
> AM_FOOFLAGS is used but not defined.
> 
> AFAIC, I'd rather spur the use of "make FOOFLAGS=value" or 
> "make -e" because environment dependent builds are harder to 
> debug when you have no clue they are environment dependent.  
> I guess everybody has already been bitten by a hidden 
> environment variable.
> 
> Still, I'm not a DejaGNU user, so maybe none of this makes sense
> and RUNTESTFLAGS must be handled differently from other
> variables.

The problem is that with recursive make (which, independent of its
harmfulness is never-the-less common) the flags do not always get passed
down from the top level.  That's probably a bug in the top-level
Makefile, but it leaves a casual user with no recourse -- the user has
no way to set RUNTESTFLAGS when running "make" at the top-level.

This explicit setting of RUNTESTFLAGS also probably defeats the use of
the GNU make "export" directive, which seems undesirable.

Builds are rarely totally independent of the environment; for example,
the choice of the compiler you get might depend on your PATH.

I don't have a terribly strong opinion here, but I think that explicitly
setting these flag variables provides only minor benefits and is a
nuisance in the imperfect real world.

-- 
Mark Mitchell <address@hidden>
CodeSourcery, LLC





reply via email to

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