help-make
[Top][All Lists]
Advanced

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

Re: White Space Problems--Again


From: Paul Smith
Subject: Re: White Space Problems--Again
Date: Thu, 02 Apr 2009 00:24:58 -0400

On Sun, 2009-03-29 at 06:26 -0500, Tom Browder wrote:
> On Sat, Mar 28, 2009 at 9:20 PM, Paul Smith <address@hidden> wrote:
> ...
> > The reality is that make's escaping features are inconsistent at best
> > and fairly useless at worst.  The trailing whitespace thing is really
> > only the tip of the iceberg.  But, it's a large iceberg and virtually
> > any possible solution would mean breaking lots of existing makefiles.
> > That's the problem with a legacy application like make.
> 
> But what about changing the behavior as a user-selectable option (and
> have it recognized by a special MAKE_?) environment variable)?

Sure, but the implementation is not so clear-cut.  Introducing a new
escape character leads to lots of problems.  First, what character do
you choose?  No matter what you choose you'll run into
incompatibilities.  And, if you use the obvious UNIX character
(backslash) then all the Windows makefiles that use backslash as
directory separators will be broken, or else not able to use this
feature (without doubling up all their backslashes).

Second, escape sequences are pretty low-level, and allowing make to
_optionally_ support them could lead to a lot of pretty disgusting code
("if escape is enabled, treat this token this way; otherwise treat it
that way" etc.) spread throughout the parser... which is already
complex.

I'm not saying it wouldn't be good to have this, I'm just saying it's
not a small problem.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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