autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

24-autom4te-normalize.patch


From: Akim Demaille
Subject: 24-autom4te-normalize.patch
Date: Fri, 17 Aug 2001 13:50:39 +0200

Smashing multiple empty lines is OK for configure, but not for test
suites, as I just experienced with M4's test suite.


Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * bin/autom4te.in: --normalize is a new option.
        * bin/autoconf.in: Use it.

Index: bin/autoconf.in
--- bin/autoconf.in Sat, 04 Aug 2001 19:23:09 +0200 akim
+++ bin/autoconf.in Thu, 16 Aug 2001 21:23:26 +0200 akim
@@ -236,6 +236,7 @@ Tracing:
 `$verbose "--verbose "`\
 `$debug && echo "--debug "`\
 `$force && echo "--force "`\
+"--normalize "\
 "--include $autoconf_dir --include $localdir "\
 "--warning syntax,$warnings "\
 "$preselect"\
Index: bin/autom4te.in
--- bin/autom4te.in Tue, 14 Aug 2001 12:02:45 +0200 akim
+++ bin/autom4te.in Thu, 16 Aug 2001 21:23:05 +0200 akim
@@ -255,6 +255,9 @@ sub load

 my $output = '-';

+# Should we normalize the output?
+my $normalize = 0;
+
 # Autom4te's default warnings, and the actual list of warnings.
 my @my_warning = ('syntax');
 my @warning;
@@ -388,6 +391,7 @@ Usage: $0 [OPTION] ... [FILES]
   -v, --verbose            verbosely report processing
   -d, --debug              don\'t remove temporary files
   -o, --output=FILE        save output in FILE (defaults to \`-\', stdout)
+      --normalize          smash successive empty lines
   -f, --force              don\'t rely on cached values
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY

@@ -579,7 +583,7 @@ sub handle_output ($$)
   while ($_ = $in->getline)
     {
       s/\s+$//;
-      if (/^$/)
+      if ($normalize && /^$/)
        {
          $separate = 1;
          next;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]