help-make
[Top][All Lists]
Advanced

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

Re: How to have real newline in emdeded command lines?


From: Paul D. Smith
Subject: Re: How to have real newline in emdeded command lines?
Date: Fri, 18 Oct 2002 22:45:19 -0400

%% Jean-Cedric Chappelier <address@hidden> writes:

  jc> What I want to do is to have a sed command emeded in the make
  jc> directives, but this sed command has to have some newlines in there.

  jc> So, is there a way to do this??

No.

This actually turns out to be a long-standing bug in GNU make--or
rather, GNU make is behaving as intended but it turns out that this
behavior is not POSIX-compliant.  The next version of GNU make will
handle this properly.

In the meantime I'm afraid there's nothing you can do except use a
separate script, or else switch to another tool (or version of sed) that
allows you to generate newlines without needing an actual newline
character; in Perl for example you can use the two-character sequence \n
and it is printed as a newline.

-- 
-------------------------------------------------------------------------------
 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]