autoconf-patches
[Top][All Lists]
Advanced

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

FYI: s/verbose/verb/


From: Akim Demaille
Subject: FYI: s/verbose/verb/
Date: Thu, 21 Aug 2003 19:51:53 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/Autom4te/General.pm (&file_name_is_absolute): Remove.
        (&verbose): Remove.
        (&getopt): Adjust the note and verb channels, depending upon
        --verbose.
        * bin/autoheader.in, bin/autom4te.in, bin/autoscan.in,
        * bin/autoupdate.in: Adjust.
        Use &verb, not &verbose.

Index: bin/autoheader.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoheader.in,v
retrieving revision 1.134
diff -u -u -r1.134 autoheader.in
--- bin/autoheader.in 21 Aug 2003 17:31:25 -0000 1.134
+++ bin/autoheader.in 21 Aug 2003 17:47:30 -0000
@@ -113,8 +113,6 @@
          'B|prepend-include=s' => address@hidden,
          'W|warnings=s'        => \&parse_warnings);
 
-  setup_channel 'note', silent => !$verbose;
-
   if (! @ARGV)
     {
       my $configure_ac = require_configure_ac;
@@ -171,7 +169,7 @@
 # ----------------------- #
 
 # Source what the traces are trying to tell us.
-verbose "$me: running $autoconf to trace from $ARGV[0]";
+verb "$me: running $autoconf to trace from $ARGV[0]";
 xsystem ("$autoconf"
         # If you change this list, update the
         # `Autoheader-preselections' section of autom4te.in.
Index: bin/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v
retrieving revision 1.86
diff -u -u -r1.86 autom4te.in
--- bin/autom4te.in 21 Aug 2003 17:25:31 -0000 1.86
+++ bin/autom4te.in 21 Aug 2003 17:47:30 -0000
@@ -716,7 +716,7 @@
 {
   my ($req, $output) = @_;
 
-  verbose "creating $output";
+  verb "creating $output";
 
   # Load the forbidden/allowed patterns.
   handle_traces ($req, "$tmp/patterns",
@@ -729,10 +729,10 @@
   my $forbidden = join ('|', map { /^forbid:([^:]+)/ } @patterns) || "^\$";
   my $allowed   = join ('|', map { /^allow:([^:]+)/  } @patterns) || "^\$";
 
-  verbose "forbidden tokens: $forbidden";
-  verbose "forbidden token : $_ => $forbidden{$_}"
+  verb "forbidden tokens: $forbidden";
+  verb "forbidden token : $_ => $forbidden{$_}"
     foreach (sort keys %forbidden);
-  verbose "allowed   tokens: $allowed";
+  verb "allowed   tokens: $allowed";
 
   # Read the (cached) raw M4 output, produce the actual result.  We
   # have to use the 2nd arg to have Autom4te::XFile honor the third, but then
@@ -902,7 +902,7 @@
 {
   my ($req, $output, %trace) = @_;
 
-  verbose "formatting traces for `$output': ", join (', ', sort keys %trace);
+  verb "formatting traces for `$output': " . join (', ', sort keys %trace);
 
   # Processing the traces.
   my $trace_m4 = new Autom4te::XFile (">$tmp/traces.m4");
@@ -1183,7 +1183,7 @@
   if $force || ! up_to_date ($req);
 
 # We now know whether we can trust the Request object.  Say it.
-verbose "$me: the trace request object is:\n" . $req->marshall;
+verb "the trace request object is:\n" . $req->marshall;
 
 # We need to run M4 if (i) the users wants it (--force), (ii) $REQ is
 # invalid.
Index: bin/autoreconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoreconf.in,v
retrieving revision 1.117
diff -u -u -r1.117 autoreconf.in
--- bin/autoreconf.in 21 Aug 2003 16:17:33 -0000 1.117
+++ bin/autoreconf.in 21 Aug 2003 17:47:30 -0000
@@ -308,7 +308,7 @@
 
   if (!$uses_autoconf)
     {
-      verbose "$configure_ac: not using Autoconf";
+      verb "$configure_ac: not using Autoconf";
       return;
     }
 
@@ -335,11 +335,11 @@
   # scanning configure.ac.
   if (!$uses_gettext)
     {
-      verbose "$configure_ac: not using Gettext";
+      verb "$configure_ac: not using Gettext";
     }
   elsif (!$install)
     {
-      verbose "$configure_ac: not running autopoint: --install not given";
+      verb "$configure_ac: not running autopoint: --install not given";
     }
   else
     {
@@ -388,7 +388,7 @@
 
   if (!$uses_aclocal)
     {
-      verbose "$configure_ac: not using aclocal";
+      verb "$configure_ac: not using aclocal";
     }
   else
     {
@@ -422,7 +422,7 @@
   my $uses_libtool;
   my $uses_autoheader;
   my @subdir;
-  verbose "$configure_ac: tracing";
+  verb "$configure_ac: tracing";
   my $traces = new Autom4te::XFile
     ("$autoconf"
      . join (' --trace=', '',
@@ -449,12 +449,12 @@
     {
       if (-d)
        {
-         verbose "$configure_ac: subdirectory $_ to autoreconf";
+         verb "$configure_ac: subdirectory $_ to autoreconf";
          autoreconf ($_);
        }
       else
        {
-         verbose "$configure_ac: subdirectory $_ not present";
+         verb "$configure_ac: subdirectory $_ not present";
        }
     }
 
@@ -471,7 +471,7 @@
 
   if (!$uses_libtool)
     {
-      verbose "$configure_ac: not using Libtool";
+      verb "$configure_ac: not using Libtool";
     }
   elsif ($install)
     {
@@ -480,7 +480,7 @@
     }
   else
     {
-      verbose "$configure_ac: not running libtoolize: --install not given";
+      verb "$configure_ac: not running libtoolize: --install not given";
     }
 
 
@@ -495,7 +495,7 @@
     {
       if (!$uses_aclocal)
        {
-         verbose "$configure_ac: not using aclocal";
+         verb "$configure_ac: not using aclocal";
        }
       else
        {
@@ -532,7 +532,7 @@
   # config.h.in when it sees an AC_CONFIG_HEADERS.
   if (!$uses_autoheader)
     {
-      verbose "$configure_ac: not using Autoheader";
+      verb "$configure_ac: not using Autoheader";
     }
   else
     {
@@ -547,7 +547,7 @@
   # Assumes that there is a Makefile.am in the topmost directory.
   if (!-f 'Makefile.am')
     {
-      verbose "$configure_ac: not using Automake";
+      verb "$configure_ac: not using Automake";
     }
   else
     {
@@ -566,7 +566,7 @@
     {
       if (!-f "config.status")
        {
-         verbose "no config.status: cannot re-make";
+         verb "no config.status: cannot re-make";
        }
       else
        {
@@ -574,7 +574,7 @@
          xsystem ("./config.status");
          if (!-f "Makefile")
            {
-             verbose "no Makefile: cannot re-make";
+             verb "no Makefile: cannot re-make";
            }
          else
            {
@@ -595,7 +595,7 @@
 
   # The format for this message is not free: taken from Emacs, itself
   # using GNU Make's format.
-  verbose "Entering directory `$directory'";
+  verb "Entering directory `$directory'";
   chdir $directory
     or error "cannot chdir to $directory: $!";
 
@@ -603,7 +603,7 @@
 
   # The format is not free: taken from Emacs, itself using GNU Make's
   # format.
-  verbose "Leaving directory `$directory'";
+  verb "Leaving directory `$directory'";
   chdir $cwd
     or error "cannot chdir to $cwd: $!";
 }
Index: bin/autoscan.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoscan.in,v
retrieving revision 1.94
diff -u -u -r1.94 autoscan.in
--- bin/autoscan.in 21 Aug 2003 17:31:25 -0000 1.94
+++ bin/autoscan.in 21 Aug 2003 17:47:30 -0000
@@ -147,7 +147,7 @@
 
   my $srcdir = $ARGV[0] || ".";
 
-  verbose "srcdir = $srcdir";
+  verb "srcdir = $srcdir";
   chdir $srcdir || error "cannot cd to $srcdir: $!";
 }
 
@@ -566,7 +566,7 @@
     join (' --trace=', '',
          uniq (sort (map { s/\(.*//; $_ } keys %needed_macros)));
 
-  verbose "running: $autoconf $trace_option $configure_ac";
+  verb "running: $autoconf $trace_option $configure_ac";
   my $traces =
     new Autom4te::XFile "$autoconf $trace_option $configure_ac|";
 
Index: bin/autoupdate.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoupdate.in,v
retrieving revision 1.46
diff -u -u -r1.46 autoupdate.in
--- bin/autoupdate.in 21 Aug 2003 06:55:42 -0000 1.46
+++ bin/autoupdate.in 21 Aug 2003 17:47:30 -0000
@@ -105,8 +105,6 @@
          'B|prepend-include=s' => address@hidden,
          'f|force'             => \$force);
 
-  setup_channel 'note', silent => !$verbose;
-
   if (! @ARGV)
     {
       my $configure_ac = require_configure_ac;
Index: lib/Autom4te/General.pm
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/Autom4te/General.pm,v
retrieving revision 1.31
diff -u -u -r1.31 General.pm
--- lib/Autom4te/General.pm 21 Aug 2003 17:31:25 -0000 1.31
+++ lib/Autom4te/General.pm 21 Aug 2003 17:47:30 -0000
@@ -36,8 +36,8 @@
 use 5.005_03;
 use Exporter;
 use Autom4te::ChannelDefs;
+use Autom4te::Channels;
 use File::Basename;
-use File::Spec;
 use File::stat;
 use IO::File;
 use Carp;
@@ -54,9 +54,8 @@
 # Functions we define and export.
 my @export_subs =
   qw (&debug
-      &file_name_is_absolute
       &getopt &mktmpdir
-      &uniq &verbose);
+      &uniq);
 
 # Functions we forward (coming from modules we use).
 my @export_forward_subs =
@@ -147,12 +146,6 @@
 =cut
 
 
-## ------------ ##
-## Prototypes.  ##
-## ------------ ##
-
-sub verbose (@);
-
 
 ## ----- ##
 ## END.  ##
@@ -247,24 +240,6 @@
 }
 
 
-=item C<file_name_is_absolute ($filename)>
-
-Wrapper around C<File::Spec->file_name_is_absolute>.  Return true iff
-C<$filename> is absolute.
-
-=cut
-
-# $BOOLEAN
-# &file_name_is_absolute ($FILE)
-# ------------------------------
-sub file_name_is_absolute ($)
-{
-  my ($file) = @_;
-  return File::Spec->file_name_is_absolute ($file);
-}
-
-
-
 =item C<getopt (%option)>
 
 Wrapper around C<Getopt::Long>.  In addition to the user C<option>s,
@@ -311,6 +286,9 @@
 
   push @ARGV, '-'
     if $stdin;
+
+  setup_channel 'note', silent => !$verbose;
+  setup_channel 'verb', silent => !$verbose;
 }
 
 
@@ -369,24 +347,6 @@
        }
     }
   return wantarray ? @res : "@res";
-}
-
-
-=item C<verbose (@message)>
-
-If the verbose mode is enabled (C<$verbose>), report the C<@message>
-on C<STDERR>, signed with the name of the program.  These messages are
-meant for ordinary users, and typically make explicit the steps being
-performed.
-
-=cut
-
-# verbose(@MESSAGE)
-# -----------------
-sub verbose (@)
-{
-  print STDERR "$me: ", @_, "\n"
-    if $verbose;
 }
 
 




reply via email to

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