-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ralf Wildenhues on 11/14/2009 5:08 AM: > Note that this patch does not fix AC_CONFIG_AUX_DIR with leading or > trailing white space. AFAICS that would need fixing in several places, > including Automake.
And it added a trailing newline to $aux_dir. What's worse is the testsuite did not catch it; but trying to autoreconf on cygwin 1.5 did (where newlines are not permitted in file names by default): > autoreconf: configure.ac: tracing > Unsuccessful stat on filename containing newline at > /home/eblake/autoconf/bin/autoreconf line 518, <GEN3> line 3. > autoreconf: configure.ac: creating directory build-aux > autoreconf: cannot create build-aux > autoreconf: : No such file or directory Sorry for not spotting it sooner. > while ($_ = $traces->getline) > { > - $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/; ... > + my ($macro, @args) = split (/::/); > + $aux_dir = $args[0] if $macro eq "AC_CONFIG_AUX_DIR"; The difference is subtle. The call to $traces->getline preserves the line separator from the trace file, even though it wasn't part of the macro argument. In the old code, the regex then stripped that newline before creating $1 and assigning to $aux_dir; but in the new code, $args[0] contains the remainder of the line from the split including the newline. Here's what I'm pushing, if it passes a testsuite run. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@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/ iEYEARECAAYFAksH7/UACgkQ84KuGfSFAYDEYACg110o1elf8hvZPKeclc5Tuqi/ zMkAniIt1ZDu/OmqU0lK81Nq0cNgBXdu =kf3W -----END PGP SIGNATURE-----
>From f6ae9102206d44004eea7332fce0f6c280e94b07 Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Sat, 21 Nov 2009 06:36:35 -0700 Subject: [PATCH] Avoid spurious newline in traced macros. * bin/autoreconf.in (tracing): Drop newline before parsing traced arguments; regression from 2009-11-14. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 6 ++++++ bin/autoreconf.in | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2d4283..ae4d7c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-21 Eric Blake <e...@byu.net> + + Avoid spurious newline in traced macros. + * bin/autoreconf.in (tracing): Drop newline before parsing traced + arguments; regression from 2009-11-14. + 2009-11-20 Eric Blake <e...@byu.net> Allow absolute names in AT_TESTED. diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 4aeca01..9f82071 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -471,6 +471,7 @@ sub autoreconf_current_directory () . ' |'); while ($_ = $traces->getline) { + chomp; my ($macro, @args) = split (/::/); $aux_dir = $args[0] if $macro eq "AC_CONFIG_AUX_DIR"; $uses_autoconf = 1 if $macro eq "AC_INIT"; -- 1.6.5.rc1