PATCH: Implement DJ's observation on $(WERROR)

DJ Delorie dj@redhat.com
Thu Mar 20 01:34:00 GMT 2003


> >> This appears to be a correct implementation of the suggestion and the
> >> best I can see.  For reasons that might be obvious to others (DJ? ;-),
> >> it was not possible to put $(WERROR) directly into STRICT2_WARN.
> 
> >Perhaps it needs to go in STAGE2_FLAGS_TO_PASS, where STRICT_WARN is
> >defined for stage2?
> 
> I had to put @WERROR@ in STRICT2_WARN not $(WERROR) since
> WERROR is not defined except inline within STAGE2_FLAGS_TO_PASS.
> What I'd be looking for is this:  how do I quote  $(WERROR) such
> that it isn't expanded until use in the recursive make where
> WERROR is properly defined for that particular stage?
> 
> If there is no such way to quote make variable expansion then
> my current solution is the only way I see to make it work.

You'd have to double or quadruple the $'s (plus a myriad of quotes and
protected quotes) to keep make from expanding it too early.  But
that's not what I meant.  I meant do this:

STAGE2_FLAGS_TO_PASS = \
	WERROR="@WERROR@" \
	STRICT_WARN="$(STRICT2_WARN) @WERROR@" \
                                     ^^^^^^^^



More information about the Gcc-patches mailing list