]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Warning and error message formatting cleanups.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 25 Apr 2010 16:26:14 +0000 (18:26 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 25 Apr 2010 18:30:05 +0000 (20:30 +0200)
* aclocal.in (parse_arguments, main): Remove trailing period or
newline in error or warning messages, avoid capitalization of
the first word of a message.
* automake.in (check_user_variables, handle_languages)
(handle_ltlibraries, scan_aclocal_m4, scan_autoconf_config_files)
(scan_autoconf_files, cond_stack_if, require_file_internal)
(usage, generate_makefile, parse_arguments): Likewise.
* lib/Automake/ChannelDefs.pm (set_strictness): Likewise.
* lib/Automake/Configure_ac.pm (find_configure_ac): Likewise.
* lib/Automake/Options.pm (set_strictness): Likewise.
* lib/Automake/Rule.pm (define): Likewise.
* lib/Automake/Variable.pm (define, variables_dump): Likewise.
* tests/ltinstloc.test, tests/suffix11.test: Adjust expected
error message.
* lib/Automake/Channels.pm (setup_channel): Reword error message
to be the same as in msg.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
aclocal.in
automake.in
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/Configure_ac.pm
lib/Automake/Options.pm
lib/Automake/Rule.pm
lib/Automake/Variable.pm
tests/ltinstloc.test
tests/suffix11.test

index 7866ba980dc25dd6f90ee059f10c2543523a6313..71b0d9bb34329b6cc475ee8a26c3d8ce890e8426 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2010-04-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Warning and error message formatting cleanups.
+       * aclocal.in (parse_arguments, main): Remove trailing period or
+       newline in error or warning messages, avoid capitalization of
+       the first word of a message.
+       * automake.in (check_user_variables, handle_languages)
+       (handle_ltlibraries, scan_aclocal_m4, scan_autoconf_config_files)
+       (scan_autoconf_files, cond_stack_if, require_file_internal)
+       (usage, generate_makefile, parse_arguments): Likewise.
+       * lib/Automake/ChannelDefs.pm (set_strictness): Likewise.
+       * lib/Automake/Configure_ac.pm (find_configure_ac): Likewise.
+       * lib/Automake/Options.pm (set_strictness): Likewise.
+       * lib/Automake/Rule.pm (define): Likewise.
+       * lib/Automake/Variable.pm (define, variables_dump): Likewise.
+       * tests/ltinstloc.test, tests/suffix11.test: Adjust expected
+       error message.
+       * lib/Automake/Channels.pm (setup_channel): Reword error message
+       to be the same as in msg.
+
        Fix placing of ellipses in English text and synopses.
        * Makefile.am: Be sure to add a space before `...' in natural
        language text.
index 964a1b50b8a3e24a26b20ecafe17ad69333497e2..06d69ed87aae5f8aef42867104ce5a17eecfd786 100644 (file)
@@ -981,13 +981,13 @@ sub parse_arguments ()
        }
       if (exists $argopts{$ARGV[0]})
        {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
+         fatal ("option `$ARGV[0]' requires an argument.\n"
+                . "Try `$0 --help' for more information");
        }
       else
        {
          fatal ("unrecognized option `$ARGV[0]'\n"
-                . "Try `$0 --help' for more information.");
+                . "Try `$0 --help' for more information");
        }
     }
 
@@ -1008,7 +1008,7 @@ sub parse_arguments ()
   if ($install && !@user_includes)
     {
       fatal ("--install should copy macros in the directory indicated by the"
-            . "\nfirst -I option, but no -I was supplied.");
+            . "\nfirst -I option, but no -I was supplied");
     }
 
   if (! -d $system_includes[0])
@@ -1059,7 +1059,7 @@ my $loop = 0;
 while (1)
   {
     ++$loop;
-    prog_error "Too many loops." if $loop > 2;
+    prog_error "too many loops" if $loop > 2;
 
     reset_maps;
     scan_m4_files;
index 33e584655df73979ae8098cdedce4f101e98fc8f..05b8711695463410ca476dcf1458ea58c6b4e7c4 100644 (file)
@@ -1327,7 +1327,7 @@ sub check_user_variables (@)
                  msg_cond_var ('gnu', $cond, $flag,
                                "`$flag' is a user variable, "
                                . "you should not override it;\n"
-                               . "use `AM_$flag' instead.");
+                               . "use `AM_$flag' instead");
                }
            }
        }
@@ -1587,7 +1587,7 @@ sub handle_languages
            my $srcdir = dirname ($source);
            if ($lang->ansi && $obj =~ /\$U/)
              {
-               prog_error "`$obj' contains \$U, but `$source' doesn't."
+               prog_error "`$obj' contains \$U, but `$source' doesn't"
                  if $source !~ /\$U/;
 
                (my $source_ = $source) =~ s/\$U/_/g;
@@ -2894,7 +2894,7 @@ sub handle_ltlibraries
 
                   my $onlyone = ($dir ne $adir) ?
                     ("\nLibtool libraries can be built for only one "
-                     . "destination.") : "";
+                     . "destination") : "";
 
                   error ($liblocations{$val}{$acond},
                          "... and should also be $adirtxt$adircond.$onlyone");
@@ -4133,7 +4133,7 @@ sub scan_aclocal_m4 ()
       push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
       msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
               "`ACLOCAL_M4_SOURCES' is obsolete.\n"
-              . "It should be safe to simply remove it.");
+              . "It should be safe to simply remove it");
     }
 
   # Note that it might be possible that aclocal.m4 doesn't exist but
@@ -5225,8 +5225,8 @@ sub scan_autoconf_config_files ($$)
       my ($local, @rest) = split (/:/);
       @rest = ("$local.in",) unless @rest;
       msg ('portability', $where,
-         "Omit leading `./' from config file names such as `$local',"
-         . "\nas not all make implementations treat `file' and `./file' equally.")
+         "omit leading `./' from config file names such as `$local',"
+         . "\nas not all make implementations treat `file' and `./file' equally")
        if ($local =~ /^\.\//);
       my $input = locate_am @rest;
       if ($input)
@@ -5586,7 +5586,7 @@ sub scan_autoconf_files ()
              . "should verify that $configure_ac invokes AM_INIT_AUTOMAKE,"
              . "\nthat aclocal.m4 is present in the top-level directory,\n"
              . "and that aclocal.m4 was recently regenerated "
-             . "(using aclocal).");
+             . "(using aclocal)");
     }
   else
     {
@@ -5597,7 +5597,7 @@ sub scan_autoconf_files ()
              error ($seen_init_automake,
                     "your implementation of AM_INIT_AUTOMAKE comes from " .
                     "an\nold Automake version.  You should recreate " .
-                    "aclocal.m4\nwith aclocal and run automake again.\n",
+                    "aclocal.m4\nwith aclocal and run automake again",
                     # $? = 63 is used to indicate version mismatch to missing.
                     exit_code => 63);
            }
@@ -5605,9 +5605,9 @@ sub scan_autoconf_files ()
            {
              error ($seen_init_automake,
                     "no proper implementation of AM_INIT_AUTOMAKE was " .
-                    "found,\nprobably because aclocal.m4 is missing...\n" .
+                    "found,\nprobably because aclocal.m4 is missing.\n" .
                     "You should run aclocal to create this file, then\n" .
-                    "run automake again.\n");
+                    "run automake again");
            }
        }
     }
@@ -6402,7 +6402,7 @@ sub cond_stack_if ($$$)
          my $mac = $_am_macro_for_cond{$cond};
          $text .= "\n  The usual way to define `$cond' is to add ";
          $text .= ($mac =~ / /) ? $mac : "`$mac'";
-         $text .= "\n  to `$configure_ac' and run `aclocal' and `autoconf' again.";
+         $text .= "\n  to `$configure_ac' and run `aclocal' and `autoconf' again";
          # These warnings appear in Automake files (depend2.am),
          # so there is no need to display them more than once:
          $scope = US_GLOBAL;
@@ -7880,7 +7880,7 @@ sub require_file_internal ($$$@)
                          $trailer2 = "\n    Consider adding the COPYING file"
                                    . " to the version control system"
                                    . "\n    for your code, to avoid questions"
-                                   . " about which license your project uses.";
+                                   . " about which license your project uses";
                        }
 
                      # Windows Perl will hang if we try to delete a
@@ -7916,7 +7916,7 @@ sub require_file_internal ($$$@)
                          # that distributes the aux dir files.
                          error ($where, 'please rerun automake without '
                                 . "Makefile arguments\n"
-                                . "so $fullfile gets distributed.");
+                                . "so $fullfile gets distributed");
                        }
                    }
                }
@@ -8323,7 +8323,7 @@ sub generate_makefile ($$)
   if (-e $out_file)
     {
       unlink ($out_file)
-       or fatal "cannot remove $out_file: $!\n";
+       or fatal "cannot remove $out_file: $!";
     }
 
   my $gm_file = new Automake::XFile "> $out_file";
@@ -8503,7 +8503,7 @@ sub parse_arguments ()
 
   if (defined $output_directory)
     {
-      msg 'obsolete', "`--output-dir' is deprecated\n";
+      msg 'obsolete', "`--output-dir' is deprecated";
     }
   else
     {
@@ -8530,20 +8530,20 @@ sub parse_arguments ()
        }
       elsif (exists $argopts{$ARGV[0]})
        {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
+         fatal ("option `$ARGV[0]' requires an argument.\n"
+                . "Try `$0 --help' for more information");
        }
       else
        {
          fatal ("unrecognized option `$ARGV[0]'.\n"
-                . "Try `$0 --help' for more information.");
+                . "Try `$0 --help' for more information");
        }
     }
 
   my $errspec = 0;
   foreach my $arg (@ARGV)
     {
-      fatal ("empty argument\nTry `$0 --help' for more information.")
+      fatal ("empty argument\nTry `$0 --help' for more information")
        if ($arg eq '');
 
       # Handle $local:$input syntax.
index 26ef575f8e9769bd57debc31a1259b8539a69de0..acb3ae8a0cccea9f1debd1223b34419f32fbc02d 100644 (file)
@@ -369,7 +369,7 @@ sub set_strictness ($)
     }
   else
     {
-      prog_error "level `$name' not recognized\n";
+      prog_error "level `$name' not recognized";
     }
 }
 
index 1fb2f53ac8e3e175a1a7d7f8ea177a72bdc7d310..aeed4db66a2cce04c636c4f3da9c903f0f4f5ef0 100644 (file)
@@ -680,7 +680,7 @@ Override the options of C<$channel> with those specified by C<%options>.
 sub setup_channel ($%)
 {
   my ($name, %opts) = @_;
-  confess "channel $name doesn't exist" unless exists $channels{$name};
+  confess "unknown channel $name" unless exists $channels{$name};
   _merge_options %{$channels{$name}}, %opts;
 }
 
index d5ad9776ed5136b628099f18374af2d40890e32d..4f0e445a1f6385a860cf642883fdc8a36b62778b 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2005, 2006, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -80,7 +81,7 @@ sub find_configure_ac (;@)
        {
          msg ('unsupported',
               "`$configure_ac' and `$configure_in' both present.\n"
-              . "proceeding with `$configure_ac'.");
+              . "proceeding with `$configure_ac'");
        }
       return $configure_ac
     }
index 0c388386dd5bf63ef8481e6e668b968e2d85e89a..a6d65a8eb8b6cd27731894444276b117e81e0938 100644 (file)
@@ -369,7 +369,7 @@ sub set_strictness ($)
     }
   else
     {
-      prog_error "level `$strictness_name' not recognized\n";
+      prog_error "level `$strictness_name' not recognized";
     }
 }
 
index ad63cc57e57d47c401d0cdb6b06ce83212136342..d9d9ae0268c4ca076bc26cc446acc17f5e99e355 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (C) 2003, 2004, 2006, 2007, 2010  Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2010  Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -727,7 +726,7 @@ sub define ($$$$$)
            }
        }
       # Never reached.
-      prog_error ("Unreachable place reached.");
+      prog_error ("unreachable place reached");
     }
 
   # Conditions for which the rule should be defined.
@@ -819,7 +818,7 @@ sub define ($$$$$)
   # definitions of multiple inference rules.  It's also
   # disallowed to mix plain targets with inference rules.
   msg ('portability', $where,
-       "Inference rules can have only one target before the colon (POSIX).")
+       "inference rules can have only one target before the colon (POSIX)")
     if $inference_rule_count > 0 && $target_count > 1;
 
   return @conds;
index af0515ef433a098f63c1ee519294c2a65a021f7a..f75ec10b7dfff57967fcf19c890936b5fc4844be 100644 (file)
@@ -884,7 +884,7 @@ sub define ($$$$$$$$)
                 . $def->type . "=' here ...", partial => 1);
          error ($where, "... and is now set with `$type=' here.");
          prog_error ("Automake variable assignments should be consistently\n"
-                     . "defined with the same sign.");
+                     . "defined with the same sign");
        }
 
       # If Automake tries to override a value specified by the user,
@@ -1078,7 +1078,7 @@ For debugging.
 
 sub variables_dump ()
 {
-  my $text = "All variables:\n{\n";
+  my $text = "all variables:\n{\n";
   foreach my $var (sort { $a->name cmp $b->name } variables)
     {
       $text .= $var->dump;
index 1b7fd83b3ed752c314d04bd341fbe80cb59083b5..18d306d9afd33915afe0bbc82fc387f408b126cd 100755 (executable)
@@ -55,7 +55,7 @@ Makefile.am:2: ... and should also be installed in `lib' in condition COND.
 Makefile.am:4: error: liba1.la multiply defined in condition COND
 Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
 Makefile.am:2: ... and should also be installed in `lib' in condition COND.
-Makefile.am:2: Libtool libraries can be built for only one destination.
+Makefile.am:2: Libtool libraries can be built for only one destination
 END
 
 grep '^Makefile.am' stderr | diff - expected
index e38926a622ce92eadb055f9a3ae66e0396a1280f..35cb41a06f9de0a24f0fa027160a9a8f43a520f4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ $ACLOCAL
 $AUTOCONF
 # What we do is not portable.  Automake should warn.
 AUTOMAKE_fails -a
-grep 'Inference rules can have only one target before the colon' stderr
+grep 'inference rules can have only one target before the colon' stderr
 # But this should work anyway.
 $AUTOMAKE -a -Wno-portability
 ./configure