[prev in list] [next in list] [prev in thread] [next in thread]
List: autoconf-bug
Subject: Re: autotest problems with m4_defun and autoconf-2.64+
From: Eric Blake <ebb9 () byu ! net>
Date: 2009-12-02 0:47:12
Message-ID: 4B15B910.9020000 () byu ! net
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Mike Frysinger on 12/1/2009 5:12 PM:
> i have a package that uses autotest and after upgrading to 2.64, it started
> issuing these errors:
>
> $ autom4te --language=autotest -o testsuite.tmp testsuite.at
> testsuite.at:4: error: m4_divert_push: cannot change diversion to `GROW'
> inside m4_expand
> testsuite.at:4: the top level
> autom4te-2.65: /usr/bin/m4 failed with exit status: 1
> make: *** [testsuite] Error 1
>
> the testsuite.at code looks like this:
>
> $ cat testsuite.at
> AT_INIT
> m4_defun([PCALC_FILESDIR], [$srcdir])
> AT_SETUP(001)
> AT_CHECK([pcalc @PCALC_FILESDIR/pcalc.001], [0], [ignore])
> AT_CLEANUP
Hmmm. This is indeed a regression, caused by the fact that AT_CHECK now
wants to pre-expand its arguments. Thanks for the report.
I'll have to think about this one. Maybe it is still possible to get
m4_expand and m4_defun'd macros to play nicely, but it won't be trivial.
m4_defun exists mainly for cases where you want to guarantee ordering with
m4_require, as well as for ease in checking whether a macro has been
previously expanded via m4_provide_if. For this simple example, you are
doing neither, so the lighter-weight m4_define is indeed the right
workaround. But I don't know that I can (or want) to make the blanket
statement that m4_defun should blindly be replaced with m4_define in autotest.
> with a little more helpful error message ? i was using m4_defun() in a
> completely different file and erroring on the AT_CHECK() line didnt really
> clue me into the actual source of the problem.
At least that task might be easier - m4_expand currently doesn't like
m4_defun'd macros attempting diversion magic, but even if I can't fix
m4_expand to play nicely with diversions, I might be able to still make it
be smarter and include the name of the m4_defun'd macro attempting the
diversion magic. At any rate, I'll try to tackle that first.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksVuRAACgkQ84KuGfSFAYACGgCgvt+I6LPH0nx7p5CXiRibZhsU
xDUAn2W+NtSrZdHl6BBufDlqcvmvTg0u
=SCNk
-----END PGP SIGNATURE-----
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic