autoconf-patches
[Top][All Lists]
Advanced

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

Re: RFI: Trailing blanks


From: Akim Demaille
Subject: Re: RFI: Trailing blanks
Date: 05 Nov 2001 18:39:51 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

| On Fri, Oct 19, 2001 at 05:00:52PM +0200, Akim Demaille wrote:
| > >>>>> "Gary" == Gary V Vaughan <address@hidden> writes:
| > 
| > Gary> But then, I wonder why you bother to `smash' anyway?  
| > 
| > Because I frequently read configure, and I like to have it readable.
| > My Autoconf programming style is also based on the hypothetic idea
| > that some day M4 could be able to expand
| > 
| > define(foo, bar
| > baz)
| >     foo
| > 
| > info
| > 
| >     bar
| >     baz
| > 
| > instead of
| > 
| >     bar
| > baz
| 
| If it was easy, then it would certainly be a nice enhancement, however
| (there's always a `however':-)!), I think what you are really asking for
| is an bourne shell `indent' ccmmand... I would rather have m4 be lean
| and mean, rather than waste cycles on this stuff -- especially
| considering the vanishingly small percentage of autoconf users who want
| to read their configure files.

Yes, I thought about such an shindent several times.  But sometimes I
felt that if the work was done upstream, other outputs than just sh
would have some benefit.  But since I appear to be the only one
looking for this feature, it would definitely be overkill :)


| > Gary> I really think that leaving the blanks in is the right solution.
| > 
| > The last argument in favor was also normalizing configure as much as
| > possible, to avoid useless diff's.  But now that we use LINENO, it
| > should be less of a problem.  So if everybody agrees --smash is
| > useless, let's remove it.
| 
| You have my vote!  (as if there was ever any doubt) :-)

Here is my word.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * bin/autom4te.in (--normalize): Remove.
        * lib/autom4te.in: Adjust.

Index: configure
===================================================================
RCS file: /cvs/autoconf/configure,v
retrieving revision 1.186
diff -u -u -r1.186 configure
--- configure 2001/11/02 17:35:50 1.186
+++ configure 2001/11/05 17:38:17
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.52e for GNU Autoconf 2.52g.
+# Generated by GNU Autoconf 2.52g for GNU Autoconf 2.52g.
 #
 # Report bugs to <address@hidden>.
 #
@@ -838,7 +838,7 @@
 if $ac_init_version; then
   cat <<\_ACEOF
 GNU Autoconf configure 2.52g
-generated by GNU Autoconf 2.52e
+generated by GNU Autoconf 2.52g
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 Free Software Foundation, Inc.
@@ -853,7 +853,7 @@
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by GNU Autoconf $as_me 2.52g, which was
-generated by GNU Autoconf 2.52e.  Invocation command line was
+generated by GNU Autoconf 2.52g.  Invocation command line was
 
   $ $0 $@
 
@@ -2021,7 +2021,7 @@
 cat >&5 <<_CSEOF
 
 This file was extended by GNU Autoconf $as_me 2.52g, which was
-generated by GNU Autoconf 2.52e.  Invocation command line was
+generated by GNU Autoconf 2.52g.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -2078,7 +2078,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 GNU Autoconf config.status 2.52g
-configured by $0, generated by GNU Autoconf 2.52e,
+configured by $0, generated by GNU Autoconf 2.52g,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Index: bin/autom4te.in
===================================================================
RCS file: /cvs/autoconf/bin/autom4te.in,v
retrieving revision 1.51
diff -u -u -r1.51 autom4te.in
--- bin/autom4te.in 2001/10/08 08:26:43 1.51
+++ bin/autom4te.in 2001/11/05 17:38:17
@@ -239,9 +239,6 @@
 
 my $output = '-';
 
-# Should we normalize the output?
-my $normalize = 0;
-
 # Mode of the output file except for traces.
 my $mode = "0666";
 
@@ -360,7 +357,6 @@
   -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
   -l, --language=LANG      specify the set of M4 macros to use
@@ -483,7 +479,6 @@
     (
      # Operation modes:
      "o|output=s"   => \$output,
-     "normalize"    => \$normalize,
      "W|warnings=s" => address@hidden,
      "m|mode=s"     => \$mode,
      "M|melt"       => \$melt,
@@ -631,29 +626,12 @@
     unless $out;
   my $in = new Autom4te::XFile ($ocache . $req->id);
 
-  my $separate = 0;
-  my $oline = 0;
   my %prohibited;
   my $res;
   while ($_ = $in->getline)
     {
       s/\s+$//;
-      if ($normalize && /^$/)
-       {
-         $separate = 1;
-         next;
-       }
-
-      if ($separate)
-       {
-         $oline++;
-         print $out "\n";
-       }
-      $separate = 0;
-
-      $oline++;
-      s/__oline__/$oline/g;
-
+      s/__oline__/$./g;
       s/\@<:\@/[/g;
       s/\@:>\@/]/g;
       s/address@hidden|\@/\$/g;
@@ -667,7 +645,7 @@
        unless /^\#\s*(if|include|endif|ifdef|ifndef|define)\b/;
       foreach (split (/\W+/))
        {
-         $prohibited{$_} = $oline
+         $prohibited{$_} = $.
            if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_};
        }
 
Index: lib/autom4te.in
===================================================================
RCS file: /cvs/autoconf/lib/autom4te.in,v
retrieving revision 1.7
diff -u -u -r1.7 autom4te.in
--- lib/autom4te.in 2001/10/08 09:40:33 1.7
+++ lib/autom4te.in 2001/11/05 17:38:17
@@ -134,7 +134,6 @@
 args: aclocal.m4?
 args: --mode 777
 args: --warning syntax
-args: --normalize
 args: --language Autoheader-preselections
 args: --language Automake-preselections
 args: --language Autoreconf-preselections
Index: man/autom4te.1
===================================================================
RCS file: /cvs/autoconf/man/autom4te.1,v
retrieving revision 1.19
diff -u -u -r1.19 autom4te.1
--- man/autom4te.1 2001/11/02 17:35:50 1.19
+++ man/autom4te.1 2001/11/05 17:38:17
@@ -29,9 +29,6 @@
 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
 save output in FILE (defaults to `-', stdout)
 .TP
-\fB\-\-normalize\fR
-smash successive empty lines
-.TP
 \fB\-f\fR, \fB\-\-force\fR
 don't rely on cached values
 .TP



reply via email to

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