Re: Having Trouble with m4 Input (m4 version 1.4.13)

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Organization Red Hat
Message-ID <[email protected]>
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   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.