autoconf-patches
[Top][All Lists]
Advanced

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

Re: autoscan -v produces gigabytes of output - take 2


From: Pavel Roskin
Subject: Re: autoscan -v produces gigabytes of output - take 2
Date: Fri, 2 Feb 2001 12:23:54 -0500 (EST)

> >     my $h = eval "\\\%$class";
> >     foreach my $word (sort keys %$h)
> >       {
> >     print "$word: @{$h->{$word}}\n";
> >       }
> >   }

Thanks, Jim!

> So Perl _can_ be beautiful ;)

Oh, yes :-)

I suggest that we settle for the modified patch. If anybody wants a list
of symbols found in a particular file, the right solution would be
different anyway - it should be possible to tell autoscan to scan only
specific files, instead of shoving megabytes of information for all files.

Regards,
Pavel Roskin

___________________________
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,12 @@
+2001-02-02  Pavel Roskin  <address@hidden>
+
+       * autoscan.pl (scan_c_file): When in verbose mode, don't print
+       out hashes common for the whole package. Do it in scan_files()
+       instead.
+       (scan_makefile): Likewise.
+       (scan_sh_file): Likewise.
+       Thanks to Jim Meyering for improved implementation.
+
 2001-02-01  Pavel Roskin  <address@hidden>

        * autoreconf.sh: Fix the case when the verbose output was not
--- autoscan.pl
+++ autoscan.pl
@@ -235,13 +235,6 @@
       $initfile = $cfiles[0];          # Pick one at random.
     }

-  if ($verbose)
-    {
-      print "cfiles:", join(" ", @cfiles), "\n";
-      print "makefiles:", join(" ", @makefiles), "\n";
-      print "shfiles:", join(" ", @shfiles), "\n";
-    }
-
   foreach $file (@cfiles)
     {
       push (@{$programs{"cc"}}, $file);
@@ -257,6 +250,24 @@
     {
       scan_sh_file ($file);
     }
+
+  if ($verbose)
+    {
+      print "cfiles:", join(" ", @cfiles), "\n";
+      print "makefiles:", join(" ", @makefiles), "\n";
+      print "shfiles:", join(" ", @shfiles), "\n";
+
+      foreach my $class (qw (functions identifiers headers
+                       makevars libraries programs))
+       {
+         print "\n$class:\n";
+         my $h = eval "\\\%$class";
+         foreach my $word (sort keys %$h)
+           {
+             print "$word: @{$h->{$word}}\n";
+           }
+       }
+    }
 }


@@ -313,29 +324,6 @@
        }
     }
   close(CFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file functions:\n";
-      foreach $word (sort keys %functions)
-       {
-         print "$word: @{$functions{$word}}\n";
-       }
-
-      print "\n$file identifiers:\n";
-      foreach $word (sort keys %identifiers)
-       {
-         print "$word: @{$identifiers{$word}}\n";
-       }
-
-      print "\n$file headers:\n";
-      foreach $word (sort keys %headers)
-       {
-         print "$word: @{$headers{$word}}\n";
-       }
-    }
 }


@@ -371,29 +359,6 @@
        }
     }
   close(MFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file makevars:\n";
-      foreach $word (sort keys %makevars)
-       {
-         print "$word: @{$makevars{$word}}\n";
-       }
-
-      print "\n$file libraries:\n";
-      foreach $word (sort keys %libraries)
-       {
-         print "$word: @{$libraries{$word}}\n";
-       }
-
-      print "\n$file programs:\n";
-      foreach $word (sort keys %programs)
-       {
-         print "$word: @{$programs{$word}}\n";
-       }
-    }
 }


@@ -418,17 +383,6 @@
        }
     }
   close(MFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file programs:\n";
-      foreach $word (sort keys %programs)
-       {
-         print "$word: @{$programs{$word}}\n";
-       }
-    }
 }


___________________________




reply via email to

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