]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.in (Task traces): Separate the error messages from the
authorAkim Demaille <akim@epita.fr>
Sat, 23 Jun 2001 22:58:54 +0000 (22:58 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 23 Jun 2001 22:58:54 +0000 (22:58 +0000)
traces to improve robustness.

ChangeLog
NEWS
autoconf.in
bin/autoconf.in

index 5d48d05c5a0232d7dd25f5bf9eeb5ee26601790f..e12d4a0881dd75132e204f2c20f19c99f0982f37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-06-24  Akim Demaille  <akim@epita.fr>
+
+       * autoconf.in (Task traces): Separate the error messages from the
+       traces to improve robustness.
+
+       
 2001-06-23  Akim Demaille  <akim@epita.fr>
 
        * tests/torture.at (AC_ARG_VAR): Make it a single test instead of
diff --git a/NEWS b/NEWS
index 4c931f416d1c5efbdb89471cdae22b2b278231b1..1554415e7964ba8d8c0da6320a7cf4636ff9653f 100644 (file)
--- 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.
   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.
index 04bc53e593792cd624ccca6ce21facf11a71f713..59a8947e3d31cbdb25df143d37b2a49ceb8ccd33 100644 (file)
@@ -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
       }
   ;;
 
index 04bc53e593792cd624ccca6ce21facf11a71f713..59a8947e3d31cbdb25df143d37b2a49ceb8ccd33 100644 (file)
@@ -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
       }
   ;;