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: mcmahill
Subject: Re: How to have real newline in emdeded command lines?
Date: Fri, 18 Oct 2002 22:53:59 -0400 (EDT)



On Fri, 18 Oct 2002, Paul D. Smith wrote:

> %% 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.

you can also use awk for this.  The nice thing is awk is more universally
installed than perl.

-Dan






reply via email to

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