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. Is this trick worth documenting in the portable Makefile section of autoconf? -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list [email protected] http://lists.gnu.org/mailman/listinfo/autoconf
