m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Tom Browder
Subject: Re: Having Trouble with m4 Input (m4 version 1.4.13)
Date: Fri, 3 Sep 2010 13:31:08 -0500

On Fri, Sep 3, 2010 at 12:55, Eric Blake <address@hidden> wrote:
> On 09/03/2010 10:14 AM, Jack J. Woehr wrote:
...
>>> define(`Min', include(`conf/MINOR'))
>>
>> Oops. No quotes around the definition body!
>
> That depends.  I've seen intentional unquoted includes in a define(), if you
> want Min to be defined to the expansion of the contents of conf/MINOR (and
> thus be expanded a second time when Min is expanded, having read the file
> exactly once), rather than defining Min to be shorthand for including the
> file in-place every time Min is expanded.

Well, in this case it doesn't matter since I will never read the file
more than once for my current use.

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.

I badly need a good chomping function and I stole it from m4sugar
because I found it was not so easy to just include m4sugar.

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.

Thanks.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]