Re: awk comands inside m4 macros

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

 



On Sunday 17 July 2005 3:19 am, Paul Eggert wrote:
> Stepan Kasal <kasal@xxxxxx> writes:
> > I noticed that Paul Eggert uses '{print $ 1}'.
>
> Yes, I found that to be by far the best solution, as '$ 1' makes it
> clear that it's the Awk '$1' rather than the M4 '$1'.
>
> The $[1], [$]1, and $[]1 solutions are used when you're trying to
> quote the m4 '$1', and they work for Awk too, but it might confuse the
> reader into thinking that another level of M4 quoting might be
> involved.  (The @S|@1 solution is too ugly for words, of course.)

And it was I who suggested it.  Of course, I agree that it is horrendously 
ugly.  I only mentioned it because I recently found it useful as a quick work 
around for quoting $[#] in a shell fragment in an AC_DEFUNed macro -- in one 
context I was finding that over quoted, in another under quoted.  The 
quadrigraph solved the problem, until I was able to find a more elegant way 
around it -- the shell, of course, doesn't allow the space between the `$' 
and the `#'.

Regards,
Keith.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux