Eric Blake wrote:
> On 06/18/2010 05:27 AM, Bruno Haible wrote:
>> Hi Eric,
>>
>>> About the only portable alternative that I could think of for a makefile
>>> would be to use multiple echo (or printf) into a temporary file, then
>>> use sed -f file, rather than relying on multiple -e.
>>
>> The makefile can also construct a newline as contents of a shell variable.
>> In Makefile syntax:
>>
>> stmt=`echo "nl='"; echo "'"`; eval "$$stmt"; : | sed -e "1{$${nl}}"
>
> Clever trick! I was giving up on `` as a way to generate newline,
> because it consumes newlines, but your use of quoting characters and
> eval solves that.
Good one, indeed.
> Is this trick worth documenting in the portable Makefile section of
> autoconf?
Yes.
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf