]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoscan.pl (scan_c_file): When in verbose mode, don't print
authorPavel Roskin <proski@gnu.org>
Fri, 2 Feb 2001 18:15:36 +0000 (18:15 +0000)
committerPavel Roskin <proski@gnu.org>
Fri, 2 Feb 2001 18:15:36 +0000 (18:15 +0000)
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.

ChangeLog
autoscan.in
autoscan.pl
bin/autoscan.in

index abe8606ebec3506065d5e83711344a19bc3c214d..40e5c4fa1a78ddc87db8344caa14543c3f566e41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-02-02  Pavel Roskin  <proski@gnu.org>
+
+       * 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  <proski@gnu.org>
 
        * autoreconf.sh: Fix the case when the verbose output was not
index 54cc1256b16976d178e7f7371c5320f975e32326..137e882916297eedfeef09a15a13ae3e854a2459 100644 (file)
@@ -235,13 +235,6 @@ sub scan_files ()
       $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 @@ sub scan_files ()
     {
       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 @@ sub scan_c_file ($)
        }
     }
   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 @@ sub scan_makefile ($)
        }
     }
   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 @@ sub scan_sh_file ($)
        }
     }
   close(MFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file programs:\n";
-      foreach $word (sort keys %programs)
-       {
-         print "$word: @{$programs{$word}}\n";
-       }
-    }
 }
 
 
index 54cc1256b16976d178e7f7371c5320f975e32326..137e882916297eedfeef09a15a13ae3e854a2459 100644 (file)
@@ -235,13 +235,6 @@ sub scan_files ()
       $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 @@ sub scan_files ()
     {
       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 @@ sub scan_c_file ($)
        }
     }
   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 @@ sub scan_makefile ($)
        }
     }
   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 @@ sub scan_sh_file ($)
        }
     }
   close(MFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file programs:\n";
-      foreach $word (sort keys %programs)
-       {
-         print "$word: @{$programs{$word}}\n";
-       }
-    }
 }
 
 
index 54cc1256b16976d178e7f7371c5320f975e32326..137e882916297eedfeef09a15a13ae3e854a2459 100644 (file)
@@ -235,13 +235,6 @@ sub scan_files ()
       $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 @@ sub scan_files ()
     {
       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 @@ sub scan_c_file ($)
        }
     }
   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 @@ sub scan_makefile ($)
        }
     }
   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 @@ sub scan_sh_file ($)
        }
     }
   close(MFILE);
-
-  if ($verbose)
-    {
-      my ($word);
-
-      print "\n$file programs:\n";
-      foreach $word (sort keys %programs)
-       {
-         print "$word: @{$programs{$word}}\n";
-       }
-    }
 }