automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2019


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2019-g4d2bf42
Date: Fri, 24 Feb 2012 16:16:57 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4d2bf42f63624e9db1d83abaf020ca79defefcd7

The branch, master has been updated
       via  4d2bf42f63624e9db1d83abaf020ca79defefcd7 (commit)
       via  00eb4ac9689ebc593e2d52ec3769e5696f105c35 (commit)
       via  1eaed7c1f2ef3ec73ed0dbc6ee18e0707b3fcc2d (commit)
      from  5d9d10e0806743b0be8e672aeb94c1e67c85c163 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4d2bf42f63624e9db1d83abaf020ca79defefcd7
Author: Stefano Lattarini <address@hidden>
Date:   Fri Feb 24 15:22:25 2012 +0100

    tests: look for GNU Java compiler at configure time
    
    Do this for consistency with what is done with other compilers.
    
    * configure.ac: Look for GNU java compiler at configure time.
    * tests/defs (gcj): Adjust and simplify.
    ($am__tool_prefix): Remove definition, it's not used anymore.

commit 00eb4ac9689ebc593e2d52ec3769e5696f105c35
Author: Stefano Lattarini <address@hidden>
Date:   Fri Feb 24 14:35:06 2012 +0100

    refactor: in Automake::Options (no semantic change)
    
    * lib/Automake/Options.pm: Prefer leading spaces to leading tabs
    throughout.  Minor whitespace and comment changes.
    (_process_option_list): Simple refactoring to make the code more
    pleasant to read and easier to modify in the future.  This
    refactoring also reduces code duplication, with the help of ...
    (_option_must_be_from_configure, _is_valid_easy_option): ... these
    new internal subroutines.
    * tests/tar3.test: Enhance.
    * tests/silent-amopts.test: New, checks that automake complains if
    the 'silent-rules' option is used in AUTOMAKE_OPTIONS.
    * tests/list-of-tests.mk: Add it.

commit 1eaed7c1f2ef3ec73ed0dbc6ee18e0707b3fcc2d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Feb 24 13:27:53 2012 +0100

    cosmetics: typofixes and whitespace changes
    
    * configure.ac: Fix a typo in comments.
    * aclocal.in: Get rid of latest form-feed (^L) usages.
    * automake.in: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 aclocal.in                                      |    2 +-
 automake.in                                     |    3 -
 configure.ac                                    |   10 ++-
 lib/Automake/Options.pm                         |  174 +++++++++++++----------
 tests/defs                                      |   16 +--
 tests/list-of-tests.mk                          |    1 +
 contrib/Makefile.am => tests/silent-amopts.test |   31 ++--
 tests/tar3.test                                 |   10 +-
 8 files changed, 136 insertions(+), 111 deletions(-)
 copy contrib/Makefile.am => tests/silent-amopts.test (71%)
 mode change 100644 => 100755

diff --git a/aclocal.in b/aclocal.in
index 70ce0c0..243c2b5 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -150,7 +150,7 @@ my $ac_version;
 
 # If set, names a temporary file that must be erased on abnormal exit.
 my $erase_me;
-
+
 ################################################################
 
 # Erase temporary file ERASE_ME.  Handle signals.
diff --git a/automake.in b/automake.in
index 6c681e2..8530d6a 100644
--- a/automake.in
+++ b/automake.in
@@ -287,7 +287,6 @@ use constant QUEUE_MESSAGE   => "msg";
 use constant QUEUE_CONF_FILE => "conf file";
 use constant QUEUE_LOCATION  => "location";
 use constant QUEUE_STRING    => "string";
-
 
 ## ---------------------------------- ##
 ## Variables related to the options.  ##
@@ -473,7 +472,6 @@ my $required_conf_file_queue;
 
 # The name of the Makefile currently being processed.
 my $am_file = 'BUG';
-
 
 ################################################################
 
@@ -593,7 +591,6 @@ my $must_handle_compiled_objects;
 
 # Record each file processed by make_paragraphs.
 my %transformed_files;
-
 
 ################################################################
 
diff --git a/configure.ac b/configure.ac
index 267e9a0..c8d5a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,7 +270,7 @@ AC_DEFUN([_AM_SKIP_COMP_TESTS],
 # Prefer generic compilers to GNU ones when possible.  This will ensure
 # more testsuite coverage "in the wild".
 # Note that we don't look for the MSVC C/C++ compiler here.  This is
-# deliberate; for more discussion an rationale, see:
+# deliberate; for more discussion and rationale, see:
 # <http://lists.gnu.org/archive/html/automake-patches/2012-01/msg00130.html>
 
 AC_MSG_NOTICE([will now look for generic compilers])
@@ -378,6 +378,14 @@ AS_IF([AM_RUN_LOG([$GNU_F77 --version && $GNU_F77 -v])], 
[],
       [AC_MSG_WARN([botched installation for GNU Fortran 77 compiler])
       _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
 
+# GNU Java compiler.
+AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
+AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
+AC_CHECK_TOOLS([GNU_GCJ], [gcj], [false])
+AS_IF([AM_RUN_LOG([$GNU_GCJ --version && $GNU_GCJ -v])], [],
+      [AC_MSG_WARN([botched installation for GNU Java compiler])
+      _AM_SKIP_COMP_TESTS([GNU Java])])
+
 # If we have been able to find at least a working compiler above, we
 # know what the object and executable extensions for this platform are.
 OBJEXT=${ac_cv_objext-UNKNOWN}
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index aac609c..651430d 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -26,11 +26,11 @@ use vars qw (@ISA @EXPORT);
 
 @ISA = qw (Exporter);
 @EXPORT = qw (option global_option
-             set_option set_global_option
-             unset_option unset_global_option
-             process_option_list process_global_option_list
-             set_strictness $strictness $strictness_name
-             &FOREIGN &GNU &GNITS);
+              set_option set_global_option
+              unset_option unset_global_option
+              process_option_list process_global_option_list
+              set_strictness $strictness $strictness_name
+              &FOREIGN &GNU &GNITS);
 
 =head1 NAME
 
@@ -71,8 +71,8 @@ F<Makefile.am>s.
 =cut
 
 # Values are the Automake::Location of the definition.
-use vars '%_options';          # From AUTOMAKE_OPTIONS
-use vars '%_global_options';   # from AM_INIT_AUTOMAKE or the command line.
+use vars '%_options';        # From AUTOMAKE_OPTIONS
+use vars '%_global_options'; # From AM_INIT_AUTOMAKE or the command line.
 
 # Whether process_option_list has already been called for the current
 # Makefile.am.
@@ -244,6 +244,53 @@ Return 1 on error, 0 otherwise.
 
 =cut
 
+# _option_must_be_from_configure ($OPTION, $WHERE)
+# ----------------------------------------------
+# Check that the $OPTION given in location $WHERE is specified with
+# AM_INIT_AUTOMAKE, not with AUTOMAKE_OPTIONS.
+sub _option_must_be_from_configure ($$)
+{
+  my ($opt, $where)= @_;
+  return
+    if $where->get =~ /^configure\./;
+  error $where,
+        "option '$opt' can only be used as argument to AM_INIT_AUTOMAKE\n" .
+        "but not in AUTOMAKE_OPTIONS makefile statements";
+}
+
+# _is_valid_easy_option ($OPTION)
+# -------------------------------
+# Explicitly recognize valid automake options that require no
+# special handling by '_process_option_list' below.
+sub _is_valid_easy_option ($)
+{
+  my $opt = shift;
+  return scalar grep { $opt eq $_ } qw(
+    check-news
+    color-tests
+    cygnus
+    dejagnu
+    dist-bzip2
+    dist-lzip
+    dist-shar
+    dist-tarZ
+    dist-xz
+    dist-zip
+    no-define
+    no-dependencies
+    no-dist
+    no-dist-gzip
+    no-exeext
+    no-installinfo
+    no-installman
+    no-texinfo.tex
+    nostdinc
+    readme-alpha
+    std-options
+    subdir-objects
+  );
+}
+
 # $BOOL
 # _process_option_list (\%OPTIONS, @LIST)
 # ------------------------------------------
@@ -262,15 +309,15 @@ sub _process_option_list (\%@)
       my $where = $h->{'where'};
       $options->{$_} = $where;
       if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign')
-       {
-         set_strictness ($_);
-       }
+        {
+          set_strictness ($_);
+        }
       elsif (/^(.*\/)?ansi2knr$/)
-       {
+        {
           # Obsolete (and now removed) de-ANSI-fication support.
           error ($where,
                  "automatic de-ANSI-fication support has been removed");
-       }
+        }
       elsif ($_ eq 'dist-lzma')
         {
           error ($where, "support for lzma-compressed distribution " .
@@ -283,73 +330,50 @@ sub _process_option_list (\%@)
       elsif ($_ eq 'serial-tests')
         {
           # This is a little of an hack, but good enough for the moment.
-         delete $options->{'parallel-tests'};
+          delete $options->{'parallel-tests'};
         }
-      elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
-            || $_ eq 'dist-shar' || $_ eq 'dist-zip'
-            || $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
-            || $_ eq 'dist-lzip' || $_ eq 'dist-xz'
-            || $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
-            || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
-            || $_ eq 'readme-alpha' || $_ eq 'check-news'
-            || $_ eq 'subdir-objects' || $_ eq 'nostdinc'
-            || $_ eq 'no-exeext' || $_ eq 'no-define'
-            || $_ eq 'std-options'
-            || $_ eq 'color-tests' 
-            || $_ eq 'cygnus' || $_ eq 'no-dependencies')
-       {
-         # Explicitly recognize these.
-       }
-      elsif ($_ =~ /^filename-length-max=(\d+)$/)
-       {
-         delete $options->{$_};
-         $options->{'filename-length-max'} = [$_, $1];
-       }
-      elsif ($_ eq  'silent-rules')
+      elsif (/^filename-length-max=(\d+)$/)
         {
-         error ($where,
-                "option '$_' can only be used as argument to 
AM_INIT_AUTOMAKE\n"
-                . "but not in AUTOMAKE_OPTIONS makefile statements")
-           if $where->get !~ /^configure\./;
-       }
+          delete $options->{$_};
+          $options->{'filename-length-max'} = [$_, $1];
+        }
+      elsif ($_ eq 'silent-rules')
+        {
+          _option_must_be_from_configure ($_, $where);
+        }
       elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
-       {
-         error ($where,
-                "option '$_' can only be used as argument to 
AM_INIT_AUTOMAKE\n"
-                . "but not in AUTOMAKE_OPTIONS makefile statements")
-           if $where->get !~ /^configure\./;
-         for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
-           {
-             next if $opt eq $_;
-             if (exists $options->{$opt})
-               {
-                 error ($where,
-                        "options '$_' and '$opt' are mutually exclusive");
-                 last;
-               }
-           }
-       }
+        {
+          _option_must_be_from_configure ($_, $where);
+          for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
+            {
+              next
+                if $opt eq $_ or ! exists $options->{$opt};
+              error ($where,
+                     "options '$_' and '$opt' are mutually exclusive");
+              last;
+            }
+        }
       elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
-       {
-         # Got a version number.
-         if (Automake::Version::check ($VERSION, $&))
-           {
-             error ($where, "require Automake $_, but have $VERSION",
-                    uniq_scope => US_GLOBAL);
-             return 1;
-           }
-       }
+        {
+          # Got a version number.
+          if (Automake::Version::check ($VERSION, $&))
+            {
+              error ($where, "require Automake $_, but have $VERSION",
+                     uniq_scope => US_GLOBAL);
+              return 1;
+            }
+        }
       elsif (/^(?:--warnings=|-W)(.*)$/)
-       {
-         my @w = map { { cat => $_, loc => $where} } split (',', $1);
-         push @warnings, @w;
-       }
-      else
-       {
-         error ($where, "option '$_' not recognized",
-                uniq_scope => US_GLOBAL);
-         return 1;
-       }
+        {
+          my @w = map { { cat => $_, loc => $where} } split (',', $1);
+          push @warnings, @w;
+        }
+      elsif (! _is_valid_easy_option $_)
+        {
+          error ($where, "option '$_' not recognized",
+                 uniq_scope => US_GLOBAL);
+          return 1;
+        }
     }
   # We process warnings here, so that any explicitly-given warning setting
   # will take precedence over warning settings defined implicitly by the
@@ -358,7 +382,7 @@ sub _process_option_list (\%@)
     {
       msg 'unsupported', $w->{'loc'},
           "unknown warning category '$w->{'cat'}'"
-       if switch_warning $w->{cat};
+        if switch_warning $w->{cat};
     }
   return 0;
 }
diff --git a/tests/defs b/tests/defs
index ab5717b..e925222 100644
--- a/tests/defs
+++ b/tests/defs
@@ -725,14 +725,6 @@ require_compiler_ ()
 ##  required by them.                                          ##
 ## ----------------------------------------------------------- ##
 
-# So that we can force the use of correct gcc, g++ etc., consistently
-# with cross-compilation settings.
-if cross_compiling; then
-  am__tool_prefix="$host_alias-"
-else
-  am__tool_prefix=
-fi
-
 # Look for (and maybe set up) required tools and/or system features; skip
 # the current test if they are not found.
 for tool in : $required
@@ -803,12 +795,8 @@ do
       unset make_
       ;;
     gcj)
-      GCJ=${am__tool_prefix}gcj
-      export GCJ
-      echo "$me: running $GCJ --version"
-      $GCJ --version || skip_all_ "GNU Java compiler not available"
-      echo "$me: running $GCJ -v"
-      $GCJ -v || skip_all_ "botched installation for GNU Java compiler"
+      GCJ=$GNU_GCJ GCJFLAGS=$GNU_GCJFLAGS; export GCJ GCJFLAGS
+      test "$GCJ" = false && skip_all_ "GNU Java compiler unavailable"
       ;;
     gcc)
       CC=$GNU_CC CFLAGS=$GNU_CFLAGS; export CC CFLAGS CPPFLAGS
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 542e1db..eaaa888 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -921,6 +921,7 @@ silentcxx.test \
 silentcxx-gcc.test \
 silentf77.test \
 silentf90.test \
+silent-amopts.test \
 silent-many-gcc.test \
 silent-many-generic.test \
 silent-nowarn.test \
diff --git a/contrib/Makefile.am b/tests/silent-amopts.test
old mode 100644
new mode 100755
similarity index 71%
copy from contrib/Makefile.am
copy to tests/silent-amopts.test
index 91c1cab..f71ad13
--- a/contrib/Makefile.am
+++ b/tests/silent-amopts.test
@@ -1,27 +1,28 @@
-## Process this file with automake to create Makefile.in
-
-## Makefile for Automake contrib.
-
+#!/bin/sh
 # Copyright (C) 2012 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
 # the Free Software Foundation; either version 2, or (at your option)
 # any later version.
-
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-EXTRA_DIST = \
-  check-html.am \
-  multilib/README \
-  multilib/config-ml.in \
-  multilib/symlink-tree \
-  multilib/multilib.am \
-  multilib/multi.m4 \
-  README
+# Check that automake complaints if the 'silent-rules' option is
+# used in AUTOMAKE_OPTIONS.
+
+. ./defs || Exit 1
+
+echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
+
+:
diff --git a/tests/tar3.test b/tests/tar3.test
index ea46bb8..403ce99 100755
--- a/tests/tar3.test
+++ b/tests/tar3.test
@@ -29,7 +29,11 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'configure.ac:2:.*mutually exclusive' stderr
+grep "^configure\.ac:2:.*mutually exclusive" stderr > tar-err
+cat tar-err
+test 1 = `wc -l < tar-err`
+grep "'tar-pax'" tar-err
+grep "'tar-v7'"  tar-err
 
 rm -rf autom4te.cache
 
@@ -43,4 +47,6 @@ END
 echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am
 
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+grep '^Makefile\.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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