maint: version bump after beta release
[platform/upstream/automake.git] / aclocal.in
index ca15732..dfb851b 100644 (file)
@@ -41,8 +41,6 @@ use Automake::ChannelDefs;
 use Automake::XFile;
 use Automake::FileUtils;
 use File::Basename;
-use File::stat;
-use Cwd;
 use File::Path ();
 
 # Some globals.
@@ -55,9 +53,9 @@ $perl_threads = 0;
 # automake macros, and finally the system-wide directories for
 # third-party macros.
 # @user_includes can be augmented with -I.
-# @automake_includes can be reset with the `--automake-acdir' option.
-# @system_includes can be augmented with the `dirlist' file or the
-# ACLOCAL_PATH environment variable, and reset with the `--system-acdir'
+# @automake_includes can be reset with the '--automake-acdir' option.
+# @system_includes can be augmented with the 'dirlist' file or the
+# ACLOCAL_PATH environment variable, and reset with the '--system-acdir'
 # option.
 my @user_includes = ();
 my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
@@ -129,9 +127,9 @@ my %serial = ();
 #   AC_DEFUN([macroname], ...)
 # or
 #   AC_DEFUN(macroname, ...)
-# When macroname is `['-quoted , we accept any character in the name,
-# except `]'.  Otherwise macroname stops on the first `]', `,', `)',
-# or `\n' encountered.
+# When macroname is '['-quoted , we accept any character in the name,
+# except ']'.  Otherwise macroname stops on the first ']', ',', ')',
+# or '\n' encountered.
 my $ac_defun_rx =
   "(?:AU_ALIAS|A[CU]_DEFUN|AC_DEFUN_ONCE)\\((?:\\[([^]]+)\\]|([^],)\n]+))";
 
@@ -151,7 +149,7 @@ my $ac_version;
 
 # If set, names a temporary file that must be erased on abnormal exit.
 my $erase_me;
-\f
+
 ################################################################
 
 # Erase temporary file ERASE_ME.  Handle signals.
@@ -165,7 +163,7 @@ sub unlink_tmp
     }
   if (defined $erase_me && -e $erase_me && !unlink ($erase_me))
     {
-      fatal "could not remove `$erase_me': $!";
+      fatal "could not remove '$erase_me': $!";
     }
   undef $erase_me;
 
@@ -197,8 +195,7 @@ sub check_acinclude ()
   foreach my $key (keys %map)
     {
       # FIXME: should print line number of acinclude.m4.
-      msg ('syntax', "warning: macro `$key' defined in "
-          . "acinclude.m4 but never used")
+      msg ('syntax', "macro '$key' defined in acinclude.m4 but never used")
        if $map{$key} eq 'acinclude.m4' && ! exists $macro_seen{$key};
     }
 }
@@ -235,12 +232,12 @@ sub install_file ($$)
     {
       if (-e $dest)
        {
-         msg 'note', "overwriting `$dest' with `$src'";
+         msg 'note', "overwriting '$dest' with '$src'";
          $diff_dest = $dest;
        }
       else
        {
-         msg 'note', "installing `$dest' from `$src'";
+         msg 'note', "installing '$dest' from '$src'";
        }
 
       if (@diff_command)
@@ -443,7 +440,7 @@ sub scan_configure_dep ($)
       while (/$m4_include_rx/go)
        {
          my $ifile = $2 || $3;
-         # Skip missing `sinclude'd files.
+         # Skip missing 'sinclude'd files.
          next if $1 ne 'm4_' && ! -f $ifile;
          push @ilist, $ifile;
        }
@@ -463,7 +460,7 @@ sub scan_configure_dep ($)
          # Make this just a warning, because we do not know whether
          # the macro is actually used (it could be called conditionally).
          msg ('unsupported', "$file:$line",
-              "warning: macro `$2' not found in library");
+              "macro '$2' not found in library");
        }
     }
 
@@ -510,7 +507,7 @@ sub scan_file ($$$)
 
   $file_type{$file} = $type;
 
-  fatal "$where: file `$file' does not exist" if ! -e $file;
+  fatal "$where: file '$file' does not exist" if ! -e $file;
 
   my $fh = new Automake::XFile $file;
   my $contents = '';
@@ -523,7 +520,7 @@ sub scan_file ($$$)
 
   while ($_ = $fh->getline)
     {
-      # Ignore `##' lines.
+      # Ignore '##' lines.
       next if /^##/;
 
       $contents .= $_;
@@ -535,7 +532,7 @@ sub scan_file ($$$)
          if ($number !~ /$serial_number_rx/go)
            {
              msg ('syntax', "$file:$.",
-                  "warning: ill-formed serial number `$number', "
+                  "ill-formed serial number '$number', "
                   . "expecting a version string with only digits and dots");
            }
          elsif ($defun_seen)
@@ -587,8 +584,8 @@ sub scan_file ($$$)
          $defun_seen = 1;
          if (! defined $1)
            {
-             msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
-                  . "\n  run info '(automake)Extending aclocal'\n"
+             msg ('syntax', "$file:$.", "underquoted definition of $2"
+                  . "\n  run info Automake 'Extending aclocal'\n"
                   . "  or see http://www.gnu.org/software/automake/manual/"
                   . "automake.html#Extending-aclocal")
                unless $underquoted_manual_once;
@@ -623,7 +620,7 @@ sub scan_file ($$$)
       while ($line =~ /$m4_include_rx/go)
        {
          my $ifile = $2 || $3;
-         # Skip missing `sinclude'd files.
+         # Skip missing 'sinclude'd files.
          next if $1 ne 'm4_' && ! -f $ifile;
          push (@inc_files, $ifile);
          $inc_lines{$ifile} = $.;
@@ -639,7 +636,7 @@ sub scan_file ($$$)
   $file_contents{$file} = $contents;
 
   # For some reason I don't understand, it does not work
-  # to do `map { scan_file ($_, ...) } @inc_files' below.
+  # to do "map { scan_file ($_, ...) } @inc_files" below.
   # With Perl 5.8.2 it undefines @inc_files.
   my @copy = @inc_files;
   my @all_inc_files = (@inc_files,
@@ -782,7 +779,7 @@ sub write_aclocal ($@)
 
       # If the file to add looks like outside the project, copy it
       # to the output.  The regex catches filenames starting with
-      # things like `/', `\', or `c:\'.
+      # things like '/', '\', or 'c:\'.
       if ($file_type{$file} != FT_USER
          || $file =~ m,^(?:\w:)?[\\/],)
        {
@@ -830,12 +827,12 @@ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [$ac_version],,
 [m4_warning([this file was generated for autoconf $ac_version.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
 $output";
     }
 
-  # We used to print `# $output_file generated automatically etc.'  But
+  # We used to print "# $output_file generated automatically etc."  But
   # this creates spurious differences when using autoreconf.  Autoreconf
   # creates aclocal.m4t and then rename it to aclocal.m4, but the
   # rebuild rules generated by Automake create aclocal.m4 directly --
@@ -843,9 +840,8 @@ $output";
   # name in the header.
   $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996-$RELEASE_YEAR Free Software Foundation, Inc.
+
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -882,7 +878,7 @@ $output";
     {
       if (-e $output_file && !unlink $output_file)
         {
-         fatal "could not remove `$output_file': $!";
+         fatal "could not remove '$output_file': $!";
        }
       my $out = new Automake::XFile "> $output_file";
       print $out $output;
@@ -897,15 +893,16 @@ sub usage ($)
 {
   my ($status) = @_;
 
-  print "Usage: aclocal [OPTIONS] ...
+  print <<'EOF';
+Usage: aclocal [OPTION]...
 
-Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
+Generate 'aclocal.m4' by scanning 'configure.ac' or 'configure.in'
 
 Options:
       --automake-acdir=DIR  directory holding automake-provided m4 files
       --system-acdir=DIR    directory holding third-party system-wide files
       --diff[=COMMAND]      run COMMAND [diff -u] on M4 files that would be
-                              changed (implies --install and --dry-run)
+                            changed (implies --install and --dry-run)
       --dry-run             pretend to, but do not actually update any file
       --force               always update output file
       --help                print this help, then exit
@@ -919,18 +916,17 @@ Options:
   -W, --warnings=CATEGORY   report the warnings falling in CATEGORY
 
 Warning categories include:
-  `syntax'        dubious syntactic constructs (default)
-  `unsupported'   unknown macros (default)
-  `all'           all the warnings (default)
-  `no-CATEGORY'   turn off warnings in CATEGORY
-  `none'          turn off all the warnings
-  `error'         treat warnings as errors
-
-" . 'Report bugs to <@PACKAGE_BUGREPORT@>.
+  syntax        dubious syntactic constructs (default)
+  unsupported   unknown macros (default)
+  all           all the warnings (default)
+  no-CATEGORY   turn off warnings in CATEGORY
+  none          turn off all the warnings
+  error         treat warnings as errors
+
+Report bugs to <@PACKAGE_BUGREPORT@>.
 GNU Automake home page: <@PACKAGE_URL@>.
 General help using GNU software: <http://www.gnu.org/gethelp/>.
-';
-
+EOF
   exit $status;
 }
 
@@ -939,7 +935,7 @@ sub version()
 {
   print <<EOF;
 aclocal (GNU $PACKAGE) $VERSION
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) $RELEASE_YEAR Free Software Foundation, Inc.
 License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
@@ -954,7 +950,7 @@ EOF
 # the public (unversioned) system directory.  This usage is obsolete.
 sub handle_acdir_option ($$)
 {
-  msg 'obsolete', '', "`--acdir' is deprecated\n";
+  msg 'obsolete', '', "'--acdir' is deprecated\n";
   @system_includes = ($_[1]);
   @automake_includes = ();
 }
@@ -986,6 +982,12 @@ sub parse_arguments ()
   use Automake::Getopt ();
   Automake::Getopt::parse_options %cli_options;
 
+  if (@ARGV > 0)
+    {
+      fatal ("non-option arguments are not accepted: '$ARGV[0]'.\n"
+             . "Try '$0 --help' for more information.");
+    }
+
   if ($print_and_exit)
     {
       print "@system_includes\n";
@@ -1003,10 +1005,10 @@ 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");
     }
 
-  # Finally, adds any directory listed in the `dirlist' file.
+  # Finally, adds any directory listed in the 'dirlist' file.
   if (open (DIRLIST, "$system_includes[0]/dirlist"))
     {
       while (<DIRLIST>)
@@ -1025,7 +1027,7 @@ sub parse_arguments ()
     }
 }
 
-# Add any directory listed in the `ACLOCAL_PATH' environment variable
+# Add any directory listed in the 'ACLOCAL_PATH' environment variable
 # to the list of system include directories.
 sub parse_ACLOCAL_PATH ()
 {
@@ -1058,7 +1060,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;