|
From: | Eric Blake |
Subject: | Re: Having Trouble with m4 Input (m4 version 1.4.13) |
Date: | Fri, 03 Sep 2010 13:38:28 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
On 09/03/2010 12:31 PM, Tom Browder wrote:
However, can anyone point to a good source of "practical" m4 macros outside the autoconf arena? I looked at several but I didn't see any plain text processing macros outside autoconf use.
Bison is another package that uses m4; but that borrows from m4sugar as well. I'm not sure what other packages use m4 on a regular basis.
And what is the best practice regarding quotes? When I had my first experience with m4 it was build configuration related and the square bracket quoting was fine and seemed "natural" (if anything in m4 can be said to be natural). It certainly helps see them better.
If you ever plan on mixing shell code with m4 (either by using [e]syscmd a lot, or by doing like autoconf and using m4 to generate shell scripts), then changing away from `' is a practical must, at which point [] works well. But if you use m4 to pre-process files into html, then `' generally works. You may also try the style of using quote strings that are longer than one byte, which is less likely to occur within the text being quoted.
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |