-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul Eggert on 2/8/2007 12:20 PM: > Can you please rewrite this so that it invokes m4 once instead of > twice, and doesn't use grep at all? You can use Perl's pattern > matching instead of grep. And I think you can test for both features > by a single call to 'm4'. This will help autom4te start up a bit > faster.
I was just copying what was already there, but yes, I will try to optimize this and resubmit. > > Perhaps it would be even better to test for these things at > configure-time: that way, we won't have to invoke 'm4' at all, at > run-time. I thought about that, but it is not as smooth an upgrade path - a user that installs autoconf 2.62 while m4 1.4.8 is installed, then upgrades to m4 1.4.9, won't get the benefit. Besides, prior to last week's patch to check for 1.4.5 in configure, we were already duplicating the check for m4 1.4 or greater in both configure and autom4te. > > A nit: the "+" isn't needed. Once you see two digits, you don't need > to look for more. But the error message is different depending on whether the + is present: $ m4 --warn-macro-sequence='\$[0-9][0-9]' <<\EOF > define(foo,$001) > EOF m4:stdin:1: Warning: definition of `foo' contains sequence `$00' $ m4 --warn-macro-sequence='\$[0-9][0-9]+' <<\EOF > define(foo,$001) > EOF m4:stdin:1: Warning: definition of `foo' contains sequence `$001' $ I thought it more user-friendly to pick up the entire string of digits, rather than stopping at the second. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFy35B84KuGfSFAYARAmz0AJ4/LglpE5cgnDyyifZhdOjzfhFQmwCgwU7x WxCsorZLQDEWLqhUERrjc9w= =OWjr -----END PGP SIGNATURE----- _______________________________________________ M4-discuss mailing list M4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss