[Top][All Lists]

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

Re: \ bug in CVS

From: Paul D. Smith
Subject: Re: \ bug in CVS
Date: Sun, 21 Aug 2005 17:50:55 -0400

%% Albert Chin <address@hidden> writes:

  ac> I've built from CVS and have the following problem:
  ac>   $ cat Makefile
  ac> rule:
  ac>   echo 'foo\
  ac>   ' >/tmp/b
  ac>   $ gmake
  ac> echo 'foo\
  ac>         ' >/tmp/b
  ac>   $ cat /tmp/b
  ac> foo\

  ac> Shouldn't /tmp/b contain "foo"?

Not according to POSIX.  The POSIX standard for make requires that make
NOT condense backslash-newline pairs before invoking the shell.  In
previous versions (3.80 and before), it incorrectly did the condensing
itself before calling the shell.  In CVS (and 3.81) it doesn't do that.

Thus, you should get identical output as you would when you run that
command in the shell (/bin/sh or whatever other POSIX shell you have, of
course, not csh or similar).

And that is:

  $ echo 'foo\
  > ' >/tmp/b
  $ cat /tmp/b

Just as is it when make does it.

 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]