From: Akim Demaille Date: Fri, 9 Jun 2000 10:02:19 +0000 (+0000) Subject: `autoconf --trace' dies on filenames with `:'. X-Git-Tag: autoconf-2.50~819 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17083325506c59ddda558e020e24bc85c67f2cb6;p=thirdparty%2Fautoconf.git `autoconf --trace' dies on filenames with `:'. Reported by Mark Elbrecht. * autoconf.sh (trace2m4.sed): Use `..*' instead of `[^:][^:]*' to catch file names. The rest of regex is probably precise enough to avoid incorrect parsing. --- diff --git a/ChangeLog b/ChangeLog index 46b35b0b4..0c13bbe24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-06-09 Akim Demaille + + `autoconf --trace' dies on filenames with `:'. + Reported by Mark Elbrecht. + + * autoconf.sh (trace2m4.sed): Use `..*' instead of + `[^:][^:]*' to catch file names. The rest of regex is probably + precise enough to avoid incorrect parsing. + 2000-06-09 Akim Demaille * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Always initialize diff --git a/autoconf.in b/autoconf.in index 320e49a97..fec48d3e9 100644 --- a/autoconf.in +++ b/autoconf.in @@ -374,6 +374,22 @@ divert(-1) define([star], [_$0([$1], args($@))]) EOF + # trace2m4.sed + # ------------ + # Transform the traces from m4 into an m4 input file. + # Typically, transform: + # | m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE]) + # into + # | AT_AC_SUBST([configure.in], [3], [1], [AC_SUBST], [exec_prefix], [NONE]) + # Pay attention that the file name might include colons, if under DOS + # for instance, so we don't use `[^:][^:]*'. + # The first s/// catches multiline traces, the second, traces as above. + preamble='m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)-' + cat >$tmp/trace2m4.sed <&2 $run_m4_trace $infile 2>&1 >/dev/null | - sed -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \([^(][^(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/' \ - -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \(.*\)$/AT_\4([\1], [\2], [\3], [\4])/' | + sed -f $tmp/trace2m4.sed | # Now we are ready to run m4 to process the trace file. $M4 $tmp/trace.m4 - | # It makes no sense to try to transform __oline__. diff --git a/autoconf.sh b/autoconf.sh index 320e49a97..fec48d3e9 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -374,6 +374,22 @@ divert(-1) define([star], [_$0([$1], args($@))]) EOF + # trace2m4.sed + # ------------ + # Transform the traces from m4 into an m4 input file. + # Typically, transform: + # | m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE]) + # into + # | AT_AC_SUBST([configure.in], [3], [1], [AC_SUBST], [exec_prefix], [NONE]) + # Pay attention that the file name might include colons, if under DOS + # for instance, so we don't use `[^:][^:]*'. + # The first s/// catches multiline traces, the second, traces as above. + preamble='m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)-' + cat >$tmp/trace2m4.sed <&2 $run_m4_trace $infile 2>&1 >/dev/null | - sed -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \([^(][^(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/' \ - -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \(.*\)$/AT_\4([\1], [\2], [\3], [\4])/' | + sed -f $tmp/trace2m4.sed | # Now we are ready to run m4 to process the trace file. $M4 $tmp/trace.m4 - | # It makes no sense to try to transform __oline__. diff --git a/bin/autoconf.in b/bin/autoconf.in index 320e49a97..fec48d3e9 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -374,6 +374,22 @@ divert(-1) define([star], [_$0([$1], args($@))]) EOF + # trace2m4.sed + # ------------ + # Transform the traces from m4 into an m4 input file. + # Typically, transform: + # | m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE]) + # into + # | AT_AC_SUBST([configure.in], [3], [1], [AC_SUBST], [exec_prefix], [NONE]) + # Pay attention that the file name might include colons, if under DOS + # for instance, so we don't use `[^:][^:]*'. + # The first s/// catches multiline traces, the second, traces as above. + preamble='m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)-' + cat >$tmp/trace2m4.sed <&2 $run_m4_trace $infile 2>&1 >/dev/null | - sed -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \([^(][^(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/' \ - -e 's/^m4trace:\([^:][^:]*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)- \(.*\)$/AT_\4([\1], [\2], [\3], [\4])/' | + sed -f $tmp/trace2m4.sed | # Now we are ready to run m4 to process the trace file. $M4 $tmp/trace.m4 - | # It makes no sense to try to transform __oline__.