autoconf-patches
[Top][All Lists]
Advanced

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

autoscan -v produces gigabytes of output


From: Pavel Roskin
Subject: autoscan -v produces gigabytes of output
Date: Thu, 1 Feb 2001 16:31:43 -0500 (EST)

Hello!

When autoscan is run in the verbose mode, some hashes common for the whole
package, notably %functions, are printed for every file.

"autoconf -v >log" filled up my hard drive when I ran it on Midnight
Commander.

Maybe autoscan should fill separate hashes first and then merge them with
the common ones, but this would affect the processing speed.

So I decided to print the hashes only after scanning all files.

Regards,
Pavel Roskin

______________________________
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,11 @@
+2001-02-01  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.
+
 2001-01-30  Ralf Corsepius <address@hidden>

        * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Remove configure.ac
--- autoscan.pl
+++ autoscan.pl
@@ -230,6 +230,8 @@
 sub scan_files ()
 {
   my $file;
+  my $word;
+
   if (defined $cfiles[0])
     {
       $initfile = $cfiles[0];          # Pick one at random.
@@ -248,15 +250,66 @@
       scan_c_file ($file);
     }

+  if ($verbose)
+    {
+      print "\nfunctions:\n";
+      foreach $word (sort keys %functions)
+       {
+         print "$word: @{$functions{$word}}\n";
+       }
+
+      print "\nidentifiers:\n";
+      foreach $word (sort keys %identifiers)
+       {
+         print "$word: @{$identifiers{$word}}\n";
+       }
+
+      print "\nheaders:\n";
+      foreach $word (sort keys %headers)
+       {
+         print "$word: @{$headers{$word}}\n";
+       }
+    }
+
   foreach $file (@makefiles)
     {
       scan_makefile ($file);
     }

+  if ($verbose)
+    {
+      print "\nmakevars:\n";
+      foreach $word (sort keys %makevars)
+       {
+         print "$word: @{$makevars{$word}}\n";
+       }
+
+      print "\nlibraries:\n";
+      foreach $word (sort keys %libraries)
+       {
+         print "$word: @{$libraries{$word}}\n";
+       }
+
+      print "\nprograms:\n";
+      foreach $word (sort keys %programs)
+       {
+         print "$word: @{$programs{$word}}\n";
+       }
+    }
+
   foreach $file (@shfiles)
     {
       scan_sh_file ($file);
     }
+
+  if ($verbose)
+    {
+      print "\nprograms:\n";
+      foreach $word (sort keys %programs)
+       {
+         print "$word: @{$programs{$word}}\n";
+       }
+    }
 }


@@ -313,29 +366,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 +401,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 +425,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]