From: Akim Demaille Date: Sat, 23 Jun 2001 22:58:54 +0000 (+0000) Subject: * autoconf.in (Task traces): Separate the error messages from the X-Git-Tag: AUTOCONF-2.50a~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca36be06060b4adade53525cbac508d5b63a09ff;p=thirdparty%2Fautoconf.git * autoconf.in (Task traces): Separate the error messages from the traces to improve robustness. --- diff --git a/ChangeLog b/ChangeLog index 5d48d05c5..e12d4a088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-06-24 Akim Demaille + + * autoconf.in (Task traces): Separate the error messages from the + traces to improve robustness. + + 2001-06-23 Akim Demaille * tests/torture.at (AC_ARG_VAR): Make it a single test instead of diff --git a/NEWS b/NEWS index 4c931f416..1554415e7 100644 --- a/NEWS +++ b/NEWS @@ -6,22 +6,20 @@ For example, `@<:@' is translated to `[' just before output. This is useful when writing strings that contain unbalanced quotes, or other hard-to-quote constructs. +- m4_pattern_forbid, m4_pattern_allow ** Default includes - Now include stdint.h. - sys/types.h and sys/stat.h are guarded. ** Bug fixes -- Mostly in the test suite. +- The test suite is more robust and presents less false failures. - Invocation of GNU M4 now robust to POSIXLY_CORRECT. - configure accepts --prefix='' again. - AC_CHECK_LIB works properly when its first argument is not a literal. -- HAVE_INTTYPES_H is defined only if not conflicting with previous - headers. +- HAVE_INTTYPES_H is defined only if not conflicting with sys/types.h. - build_, host_, and target_alias are AC_SUBST as in 2.13. -- AC_ARG_VAR: The latest value of precious variables is saved, instead - of the first one. - AC_ARG_VAR properly propagates precious variables inherited from the environment to ./config.status. - Using --program-suffix/--program-prefix is portable. @@ -29,12 +27,13 @@ likely. - `config.status foo' works properly when `foo' depends on variables set in an AC_CONFIG_THING INIT-CMD. -- if inttypes.h and sys/types.h are conflicting, consider inttypes.h - doesn't exist. +- autoheader is more robust to broken input. ** Generic macros - AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to specify pre-includes. +- AC_ARG_VAR refuses to run configure when precious variable have + changed. ** Specific Macros - AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link. diff --git a/autoconf.in b/autoconf.in index 04bc53e59..59a8947e3 100644 --- a/autoconf.in +++ b/autoconf.in @@ -733,9 +733,22 @@ EOF fi # Run m4 on the input file to get traces. - $verbose "$me: running $run_m4_trace $trace_prefiles $infile | $M4 $tmp/trace.m4" >&2 - $run_m4_trace $trace_prefiles $infile 2>&1 >/dev/null | - sed -f $tmp/trace2m4.sed | + # + # We used to have a simple pipe, which was very convenient as it + # allows to use traces on never ending expansions (i.e., when + # debugging :) but it is requires to keep error messages *and* + # traces in stderr. This is too fragile, as it results in + # unexpected data in the output. autoheader has been fragile to + # this. + $verbose "$me: running $run_m4_trace $trace_prefiles $infile -o $tmp/traces" >&2 + $run_m4_trace $trace_prefiles $infile -o $tmp/traces >/dev/null || + { + echo "$me: tracing failed" >&2 + (exit 1); exit 1 + } + + $verbose "$me: running $M4 $tmp/trace.m4" >&2 + sed -f $tmp/trace2m4.sed $tmp/traces | # Now we are ready to run m4 to process the trace file. if $debug; then cat >>$tmp/trace.m4 @@ -745,14 +758,14 @@ EOF fi | # It makes no sense to try to transform __oline__. sed ' - s/@<:@/[/g - s/@:>@/]/g - s/@S|@/$/g - s/@%:@/#/g - ' >&4 || + s/@<:@/[/g + s/@:>@/]/g + s/@S|@/$/g + s/@%:@/#/g + ' >&4 || { - echo "$me: tracing failed" >&2 - (exit 1); exit 1 + echo "$me: traces formatting failed" >&2 + (exit 1); exit 1 } ;; diff --git a/bin/autoconf.in b/bin/autoconf.in index 04bc53e59..59a8947e3 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -733,9 +733,22 @@ EOF fi # Run m4 on the input file to get traces. - $verbose "$me: running $run_m4_trace $trace_prefiles $infile | $M4 $tmp/trace.m4" >&2 - $run_m4_trace $trace_prefiles $infile 2>&1 >/dev/null | - sed -f $tmp/trace2m4.sed | + # + # We used to have a simple pipe, which was very convenient as it + # allows to use traces on never ending expansions (i.e., when + # debugging :) but it is requires to keep error messages *and* + # traces in stderr. This is too fragile, as it results in + # unexpected data in the output. autoheader has been fragile to + # this. + $verbose "$me: running $run_m4_trace $trace_prefiles $infile -o $tmp/traces" >&2 + $run_m4_trace $trace_prefiles $infile -o $tmp/traces >/dev/null || + { + echo "$me: tracing failed" >&2 + (exit 1); exit 1 + } + + $verbose "$me: running $M4 $tmp/trace.m4" >&2 + sed -f $tmp/trace2m4.sed $tmp/traces | # Now we are ready to run m4 to process the trace file. if $debug; then cat >>$tmp/trace.m4 @@ -745,14 +758,14 @@ EOF fi | # It makes no sense to try to transform __oline__. sed ' - s/@<:@/[/g - s/@:>@/]/g - s/@S|@/$/g - s/@%:@/#/g - ' >&4 || + s/@<:@/[/g + s/@:>@/]/g + s/@S|@/$/g + s/@%:@/#/g + ' >&4 || { - echo "$me: tracing failed" >&2 - (exit 1); exit 1 + echo "$me: traces formatting failed" >&2 + (exit 1); exit 1 } ;;