NetBSD-Bugs archive

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

Re: toolchain/44844: [dM] make(1) expands variables inconsistently



The following reply was made to PR toolchain/44844; it has been noted by GNATS.

From: der Mouse <mouse%Rodents-Montreal.ORG@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/44844: [dM] make(1) expands variables inconsistently
Date: Sun, 1 May 2011 01:44:44 -0400 (EDT)

 >> [...] I am inclined to believe the NetBSD behaviour is a bug.
 > It is, and as I'm pretty sure I've already stated somewhere I can't
 > currently find (maybe it was on tech-toolchain?) this was fixed
 > before branching -5.
 
 It does appear to have been.  A 5.1 machine at work does not misbehave
 on the test case in the PR.
 
 >>     -       cp = Var_Subst(NULL, cp, ctxt, FALSE);
 >>     +       cp = Var_Subst(NULL, cp, VAR_CMD, FALSE);
 > This, however, is not the fix in -5, so I want to spend some time to
 > chew this over before committing to it.
 
 You might not want to commit it at all.  If the behaviour is fixed in
 5.1, exactly how it's fixed does not strike me as terribly important.
 And 1.4T does not misbehave even though its analogous code has the ctxt
 version of that line.
 
 I haven't investigated how 1.4T and 5.1 avoid the issue even though
 they don't have the above change.  I don't totally understand the VAR_*
 mechanism; it appears to be designed to support allowing command-line
 settings of variables to override other settings even when variables
 are set repeatedly and such.  Personally, I'd prefer some other way of
 doing that, but such a change would be a much more intrusive rework
 (and correspondingly harder to get right).
 
 I'm tempted to say that _every_ Var_Subst() call should use VAR_CMD
 (or, perhaps, remove that argument altogether), on the grounds that
 variable expansion should always use the command-line value if there is
 one, but I'm not quite sure enough to actually make such a change.
 
 /~\ The ASCII                            Mouse
 \ / Ribbon Campaign
  X  Against HTML               mouse%rodents-montreal.org@localhost
 / \ Email!          7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 


Home | Main Index | Thread Index | Old Index