[Novalug] Indented word-wrapped echoing from a makefile

jecottrell3@comcast.net jecottrell3@comcast.net
Fri Dec 14 13:24:17 EST 2012


You can also pipe thru fmt to wrap at line breaks.

The following comment doesn't apply here, because you want to actively change what is being echoed, but for short comments I have gone from using '@echo comments here' to using ': comments here'. Remember that ':' is a 'command' that always returns true. The line is echoed by Make itself, is less cluttered, and looks the same as the 'make -n' output.

FWIW, I would echo a TAB after the NL in the sed command.

JIM

P.S. sed has never insisted on -e, so I never use it.

----- Original Message -----
From: "Michael Henry" <lug-user@drmikehenry.com>
To: "novalug" <novalug@calypso.tux.org>
Sent: Friday, December 14, 2012 7:28:49 AM
Subject: Re: [Novalug] Indented word-wrapped echoing from a makefile

On 12/13/2012 01:55 PM, Jon LaBadie wrote:
> Just put a space after the "=".
>
> @echo LIST= $(LIST) | sed -e 's/ /\n /g'

Adding the space is a clever simplifier.  This sed one-liner is
small and elegant.

Thanks to all for the suggestions!

Michael Henry

_______________________________________________
Novalug mailing list
Novalug@calypso.tux.org
http://calypso.tux.org/mailman/listinfo/novalug



More information about the Novalug mailing list