bug-make
[Top][All Lists]
Advanced

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

Re: Change of behavior: 3.80 vs 3.81beta3 WRT line continuation


From: Paul D. Smith
Subject: Re: Change of behavior: 3.80 vs 3.81beta3 WRT line continuation
Date: Sun, 21 Aug 2005 18:28:08 -0400

%% Steve James <address@hidden> writes:

  sj> AFAICT the behavior of line continuation escapes has changed
  sj> within single-quoted strings. What's really confusing me is that
  sj> this seems to be deliberate.

Yes, you're right on all counts.  So.... what's confusing? :-)

  sj> all:
  sj>         @echo 'line1\
  sj> line2'

  sj> Version 3.80 prints this (as I would expect):
  sj> line1line2

You may expect that because that's what make has printed in the past,
but that's not the correct result according to the POSIX definition of
make.

Please see the NEWS file, or the GNU make manual (the version provided
with beta3 of course).

  sj> But Version 3.80beta3 prints this:
  sj> line1\
  sj> line2

This is correct.

  sj> There's some background to this change concerning POSIX (Savannah
  sj> bug # 1332).

Right.  Did you look up that bug and the accompanying commentary on
Savannah?

  sj> See, entirely deliberate. What's more the regression tests in
  sj> tests/scripts/misc/general3 verify this behavior. But this all
  sj> looks broken to me.

Why does it look broken?  Run the same command in a (POSIX) shell and
you'll get the new behavior, not the old behavior:

    $ echo 'line1\
    > line2'
    line1\
    line2

So, why is it broken that when make invokes a shell to run that same
command you get the same result?

  sj> So what's up? Is this
  sj> 1. A new bug in the beta,

No.

  sj> 2. A deliberate non-backward compatibility

Yes... it's a change that was made so that GNU make would conform to the
POSIX specification for make.  Unfortunately, that involves an
incompatibility.

Again, the NEWS file has info about this and other user-visible changes;
it should always be the first place you look when upgrading versions of
GNU make.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]