automake-commit
[Top][All Lists]
Advanced

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

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


From: Peter Rosin
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.3-28-g44565da
Date: Fri, 02 Mar 2012 15:42:09 +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=44565da0b256d670e8d1f8b62943099e2aafa0d2

The branch, branch-1.11 has been updated
       via  44565da0b256d670e8d1f8b62943099e2aafa0d2 (commit)
       via  54a402e5e624bebdfef421512faecf5e4f3463ab (commit)
       via  8be5d254bc1534436571aeeca0ad76bf6058e7f1 (commit)
       via  aadd78e9ce1407d49af2e690c2f230ef468fba82 (commit)
       via  51f61dfb1e861062aaa1d73fab71278c85fe0594 (commit)
       via  7d335efe6f874af817c2f29ef85a803d8db8a43a (commit)
       via  4df475a2d5ee114d1709884ec57698d34c5493cb (commit)
       via  db5ddc2bfceeb4470d02c2ff2375cf5900415493 (commit)
       via  8dd5009996be46270a58bde8be4343410ea5df51 (commit)
       via  43b8af82db9fb7077ae687998bf96e9781460665 (commit)
       via  4ced60d7fc474f008d642e280f7205f75f7c04d9 (commit)
      from  3c0d8213bc1d7a6a11defbd8d1e904fb0a1eee99 (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 44565da0b256d670e8d1f8b62943099e2aafa0d2
Merge: 3c0d821 54a402e
Author: Peter Rosin <address@hidden>
Date:   Fri Mar 2 16:31:32 2012 +0100

    Merge branch 'msvc' into branch-1.11
    
    * msvc:
      news: add entry about recent 'ar-lib' changes
      scripts: recognize the "q", "s" and "S" actions/modifiers in ar-lib
      vala: fix 'valac' calls for projects with mixed Vala/C
      vala: expose automake bug#10894
      dryrun: $(am__dry_run) not confused by metachars in $(MAKEFLAGS)
      update-copyright: don't touch files synced from external packages
      fixup: distribute 'lib/update-copyright'
      maint: add a rule to use gnulib's update-copyright
      fixup: do not tickle makefile-deps.test with the make_dryrun code

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

Summary of changes:
 Makefile.am                             |   17 ++-
 NEWS                                    |    8 +
 THANKS                                  |    1 +
 automake.in                             |   27 ++--
 lib/Makefile.am                         |    2 +-
 lib/am/header-vars.am                   |   27 ++-
 lib/ar-lib                              |   13 +-
 lib/update-copyright                    |  274 +++++++++++++++++++++++++++++++
 tests/ar-lib.test                       |   26 +++
 tests/depcomp8b.test                    |    2 +-
 tests/list-of-tests.mk                  |    4 +
 tests/{vala-mix.test => vala-mix2.test} |   78 +++++----
 12 files changed, 413 insertions(+), 66 deletions(-)
 create mode 100755 lib/update-copyright
 copy tests/{vala-mix.test => vala-mix2.test} (64%)

diff --git a/Makefile.am b/Makefile.am
index 56784ca..d02731f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -752,7 +752,8 @@ config.guess \
 config.sub \
 gnupload \
 gitlog-to-changelog \
-texinfo.tex
+texinfo.tex \
+update-copyright
 
 ## Fetch the latest versions of files we care about.
 fetch:
@@ -765,6 +766,7 @@ fetch:
        $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
        $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
        $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
+       $(WGET_SV_GIT_GL)build-aux/update-copyright -O update-copyright && \
        $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
 ## Don't exit after test because we want to give as many errors as
 ## possible.
@@ -812,3 +814,16 @@ release-stats: ps
        printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
                      $$today $(VERSION) $$am    $$acl    $$pm   $$aml 
"($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
 .PHONY: release-stats
+
+update_copyright_env = \
+  UPDATE_COPYRIGHT_FORCE=1 \
+  UPDATE_COPYRIGHT_USE_INTERVALS=2
+
+.PHONY: update-copyright
+update-copyright:
+       $(AM_V_GEN)excluded_re=`echo $(FETCHFILES) \
+         | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \
+       $(GIT) ls-files \
+         | grep -Ev '/(COPYING|INSTALL)' \
+         | grep -Ev "^($$excluded_re)$$" \
+         | $(update_copyright_env) xargs $(srcdir)/lib/$@
diff --git a/NEWS b/NEWS
index 0b1e7a4..12beca9 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,14 @@ New in 1.11.3a:
     `extra-portability' category will be enabled by `-Wall' (right now,
     one has to use `-Wextra-portability' explicitly).
 
+* Miscellaneous changes:
+
+  - The 'ar-lib' script now ignores the "s" (symbol index) and "S" (no
+    symbol index) modifiers as well as the "s" action, as the symbol index
+    is created unconditionally by Microsoft lib.  Also, the "q" (quick)
+    action is now a synonym for "r" (replace).  Also, the script has been
+    ignoring the "v" (verbose) modifier already since Automake 1.11.3.
+
 Bugs fixed in 1.11.3a:
 
 * Bugs introduced by 1.11.3:
diff --git a/THANKS b/THANKS
index b512b6b..d54e9d4 100644
--- a/THANKS
+++ b/THANKS
@@ -264,6 +264,7 @@ Olivier Louchart-Fletcher address@hidden
 Olly Betts             address@hidden
 Oren Ben-Kiki          address@hidden
 Owen Taylor            address@hidden
+Quentin Glidic         address@hidden
 Patrick Welche         address@hidden
 Patrik Weiskircher     address@hidden
 Paul Berrevoets                address@hidden
diff --git a/automake.in b/automake.in
index 69b6010..08b3300 100644
--- a/automake.in
+++ b/automake.in
@@ -6036,20 +6036,19 @@ sub lang_vala_finish_target ($$)
   my ($self, $name) = @_;
 
   my $derived = canonicalize ($name);
-  my $varname = $derived . '_SOURCES';
-  my $var = var ($varname);
+  my $var = var "${derived}_SOURCES";
+  return unless $var;
 
-  if ($var)
+  my @vala_sources = grep { /\.vala$/ } ($var->value_as_list_recursive);
+
+  foreach my $vala_file (@vala_sources)
     {
-      foreach my $file ($var->value_as_list_recursive)
-        {
-          $output_rules .= "\$(srcdir)/$file: 
\$(srcdir)/${derived}_vala.stamp\n"
-            . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
-            . "address@hidden test -f \$@; then :; else \\\n"
-            . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; 
\\\n"
-           . "\tfi\n"
-            if $file =~ s/(.*)\.vala$/$1.c/;
-        }
+      (my $c_file = $vala_file) =~ s/(.*)\.vala$/$1.c/;
+      $output_rules .= "\$(srcdir)/$c_file: \$(srcdir)/${derived}_vala.stamp\n"
+        . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+        . "address@hidden test -f \$@; then :; else \\\n"
+        . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; 
\\\n"
+        . "\tfi\n"
     }
 
   # Add rebuild rules for generated header and vapi files
@@ -6099,7 +6098,7 @@ sub lang_vala_finish_target ($$)
   my $silent = silent_flag ();
 
   $output_rules .=
-    "\$(srcdir)/${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
+    "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
 # Since the C files generated from the vala sources depend on the
 # ${derived}_vala.stamp file, we must ensure its timestamp is older than
 # those of the C files generated by the valac invocation below (this is
@@ -6107,7 +6106,7 @@ sub lang_vala_finish_target ($$)
 # Thus we need to create the stamp file *before* invoking valac, and to
 # move it to its final location only after valac has been invoked.
     "\t${silent}rm -f \$\@ && echo stamp > address@hidden".
-    "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
+    "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
     "\t${silent}mv -f address@hidden address@hidden";
 
   push_dist_common ("${derived}_vala.stamp");
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f4acc8a..d9dabb6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -31,7 +31,7 @@ dist_script_DATA = config.guess config.sub install-sh 
mdate-sh missing \
   mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
   symlink-tree ar-lib
 
-EXTRA_DIST = gnupload gitlog-to-changelog
+EXTRA_DIST = gnupload gitlog-to-changelog update-copyright
 
 install-data-hook:
        @$(POST_INSTALL)
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 1078a3d..2d81009 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -31,17 +31,28 @@ VPATH = @srcdir@
 ## ("make -n") or not.  Useful in rules that invoke make recursively,
 ## and are thus executed also with "make -n" -- either because they
 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
-## their recipes contain the "$(MAKE)" string (GNU and Solari make).
+## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
+
 am__make_dryrun = \
   { \
     am__dry=no; \
-    for am__flg in : $(MAKEFLAGS); do \
-      case $$am__flg in \
-        :) ;; \
-        *=*|--*) ;; \
-        *n*) am__dry=yes; break;; \
-      esac; \
-    done; \
+    case $$MAKEFLAGS in \
+## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS
+## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted
+## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
+## misinterpret that as and indication that make is running in dry mode.
+## This has already happened in practice.  So we need this hack.
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
     test $$am__dry = yes; \
   }
 
diff --git a/lib/ar-lib b/lib/ar-lib
index c0286a4..0f62c6f 100755
--- a/lib/ar-lib
+++ b/lib/ar-lib
@@ -2,7 +2,7 @@
 # Wrapper for Microsoft lib.exe
 
 me=ar-lib
-scriptversion=2012-01-30.22; # UTC
+scriptversion=2012-03-01.08; # UTC
 
 # Copyright (C) 2010, 2012 Free Software Foundation, Inc.
 # Written by Peter Rosin <address@hidden>.
@@ -153,7 +153,9 @@ action=${action#-}
 delete=
 extract=
 list=
+quick=
 replace=
+index=
 create=
 
 while test -n "$action"
@@ -162,7 +164,10 @@ do
     d*) delete=yes  ;;
     x*) extract=yes ;;
     t*) list=yes    ;;
+    q*) quick=yes   ;;
     r*) replace=yes ;;
+    s*) index=yes   ;;
+    S*)             ;; # the index is always updated implicitly
     c*) create=yes  ;;
     u*)             ;; # TODO: don't ignore the update modifier
     v*)             ;; # TODO: don't ignore the verbose modifier
@@ -173,8 +178,8 @@ do
   action=${action#?}
 done
 
-case $delete$extract$list$replace in
-  yes)
+case $delete$extract$list$quick$replace,$index in
+  yes,* | ,yes)
     ;;
   yesyes*)
     func_error "more than one action specified"
@@ -225,7 +230,7 @@ elif test -n "$extract"; then
     done
   fi
 
-elif test -n "$replace"; then
+elif test -n "$quick$replace"; then
   if test ! -f "$orig_archive"; then
     if test -z "$create"; then
       echo "$me: creating $orig_archive"
diff --git a/lib/update-copyright b/lib/update-copyright
new file mode 100755
index 0000000..082b749
--- /dev/null
+++ b/lib/update-copyright
@@ -0,0 +1,274 @@
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+    if 0;
+# Update an FSF copyright year list to include the current year.
+
+my $VERSION = '2012-02-05.21:39'; # UTC
+
+# Copyright (C) 2009-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 3, 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/>.
+
+# Written by Jim Meyering and Joel E. Denny
+
+# The arguments to this script should be names of files that contain
+# copyright statements to be updated.  The copyright holder's name
+# defaults to "Free Software Foundation, Inc." but may be changed to
+# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
+# variable.
+#
+# For example, you might wish to use the update-copyright target rule
+# in maint.mk from gnulib's maintainer-makefile module.
+#
+# Iff a copyright statement is recognized in a file and the final
+# year is not the current year, then the statement is updated for the
+# new year and it is reformatted to:
+#
+#   1. Fit within 72 columns.
+#   2. Convert 2-digit years to 4-digit years by prepending "19".
+#   3. Expand copyright year intervals.  (See "Environment variables"
+#      below.)
+#
+# A warning is printed for every file for which no copyright
+# statement is recognized.
+#
+# Each file's copyright statement must be formatted correctly in
+# order to be recognized.  For example, each of these is fine:
+#
+#   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+#   Foundation, Inc.
+#
+#   # Copyright (C) 1990-2005, 2007-2009 Free Software
+#   # Foundation, Inc.
+#
+#   /*
+#    * Copyright &copy; 90,2005,2007-2009
+#    * Free Software Foundation, Inc.
+#    */
+#
+# However, the following format is not recognized because the line
+# prefix changes after the first line:
+#
+#   ## Copyright (C) 1990-2005, 2007-2009 Free Software
+#   #  Foundation, Inc.
+#
+# However, any correctly formatted copyright statement following
+# a non-matching copyright statements would be recognized.
+#
+# The exact conditions that a file's copyright statement must meet
+# to be recognized are:
+#
+#   1. It is the first copyright statement that meets all of the
+#      following conditions.  Subsequent copyright statements are
+#      ignored.
+#   2. Its format is "Copyright (C)", then a list of copyright years,
+#      and then the name of the copyright holder.
+#   3. The "(C)" takes one of the following forms or is omitted
+#      entirely:
+#
+#        A. (C)
+#        B. (c)
+#        C. @copyright{}
+#        D. &copy;
+#
+#   4. The "Copyright" appears at the beginning of a line, except that it
+#      may be prefixed by any sequence (e.g., a comment) of no more than
+#      5 characters -- including white space.
+#   5. Iff such a prefix is present, the same prefix appears at the
+#      beginning of each remaining line within the FSF copyright
+#      statement.  There is one exception in order to support C-style
+#      comments: if the first line's prefix contains nothing but
+#      whitespace surrounding a "/*", then the prefix for all subsequent
+#      lines is the same as the first line's prefix except with each of
+#      "/" and possibly "*" replaced by a " ".  The replacement of "*"
+#      by " " is consistent throughout all subsequent lines.
+#   6. Blank lines, even if preceded by the prefix, do not appear
+#      within the FSF copyright statement.
+#   7. Each copyright year is 2 or 4 digits, and years are separated by
+#      commas or dashes.  Whitespace may appear after commas.
+#
+# Environment variables:
+#
+#   1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+#      is reformatted even if it does not need updating for the new
+#      year.  If unset or set to 0, only updated FSF copyright
+#      statements are reformatted.
+#   2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+#      copyright years (such as 90, 1991, 1992-2007, 2008) in a
+#      reformatted FSF copyright statement is collapsed to a single
+#      interval (such as 1990-2008).  If unset or set to 0, all existing
+#      copyright year intervals in a reformatted FSF copyright statement
+#      are expanded instead.
+#      If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+#      to the minimal containing range.  For example, convert
+#      2000, 2004-2007, 2009 to 2000-2009.
+#   3. For testing purposes, you can set the assumed current year in
+#      UPDATE_COPYRIGHT_YEAR.
+#   4. The default maximum line length for a copyright line is 72.
+#      Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
+#   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
+#      than "Free Software Foundation, Inc.".
+
+use strict;
+use warnings;
+
+my $copyright_re = 'Copyright';
+my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
+$holder ||= 'Free Software Foundation, Inc.';
+my $prefix_max = 5;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+  and $margin = 72;
+
+my $tab_width = 8;
+
+my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
+if (!$this_year || $this_year !~ m/^\d{4}$/)
+  {
+    my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
+    $this_year = $year + 1900;
+  }
+
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
+my $leading;
+my $prefix;
+my $ws_re;
+my $stmt_re;
+while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
+  {
+    $leading = "$1$2";
+    $prefix = $2;
+    if ($prefix =~ /^(\s*\/)\*(\s*)$/)
+      {
+        $prefix =~ s,/, ,;
+        my $prefix_ws = $prefix;
+        $prefix_ws =~ s/\*/ /; # Only whitespace.
+        if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
+          {
+            $prefix = $prefix_ws;
+          }
+      }
+    $ws_re = '[ \t\r\f]'; # \s without \n
+    $ws_re =
+      "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
+    my $holder_re = $holder;
+    $holder_re =~ s/\s/$ws_re/g;
+    my $stmt_remainder_re =
+      "(?:$ws_re$circle_c_re)?"
+      . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+      . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
+    if (/\G$stmt_remainder_re/)
+      {
+        $stmt_re =
+          quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
+        last;
+      }
+  }
+if (defined $stmt_re)
+  {
+    /$stmt_re/ or die; # Should never die.
+    my $stmt = $1;
+    my $final_year_orig = $2;
+
+    # Handle two-digit year numbers like "98" and "99".
+    my $final_year = $final_year_orig;
+    $final_year <= 99
+      and $final_year += 1900;
+
+    if ($final_year != $this_year)
+      {
+        # Update the year.
+        $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+      }
+    if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+      {
+        # Normalize all whitespace including newline-prefix sequences.
+        $stmt =~ s/$ws_re/ /g;
+
+        # Put spaces after commas.
+        $stmt =~ s/, ?/, /g;
+
+        # Convert 2-digit to 4-digit years.
+        $stmt =~ s/(\b\d\d\b)/19$1/g;
+
+        # Make the use of intervals consistent.
+        if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
+          {
+            $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+          }
+        else
+          {
+            $stmt =~
+              s/
+                (\d{4})
+                (?:
+                  (,\ |-)
+                  ((??{
+                    if    ($2 eq '-') { '\d{4}'; }
+                    elsif (!$3)       { $1 + 1;  }
+                    else              { $3 + 1;  }
+                  }))
+                )+
+              /$1-$3/gx;
+
+            # When it's 2, emit a single range encompassing all year numbers.
+            $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+              and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
+          }
+
+        # Format within margin.
+        my $stmt_wrapped;
+        my $text_margin = $margin - length($prefix);
+        if ($prefix =~ /^(\t+)/)
+          {
+            $text_margin -= length($1) * ($tab_width - 1);
+          }
+        while (length $stmt)
+          {
+            if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
+                || ($stmt =~ s/^([\S]+)(?: |$)//))
+              {
+                my $line = $1;
+                $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
+                $stmt_wrapped .= $line;
+              }
+            else
+              {
+                # Should be unreachable, but we don't want an infinite
+                # loop if it can be reached.
+                die;
+              }
+          }
+
+        # Replace the old copyright statement.
+        s/$stmt_re/$stmt_wrapped/;
+      }
+  }
+else
+  {
+    print STDERR "$ARGV: warning: copyright statement not found\n";
+  }
+
+# Local variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/tests/ar-lib.test b/tests/ar-lib.test
index a929ea4..1bb46b1 100755
--- a/tests/ar-lib.test
+++ b/tests/ar-lib.test
@@ -45,6 +45,23 @@ touch foo.lib
 opts=`./ar-lib ./lib r foo.lib foo.obj`
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
+# Check if ar-lib can update an existing archive with "q".
+opts=`./ar-lib ./lib q foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "u" as a modifier.
+# NOTE: "u" should have an effect, but currently doesn't.
+opts=`./ar-lib ./lib ru foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "s" as a modifier.
+opts=`./ar-lib ./lib rs foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "S" as a modifier.
+opts=`./ar-lib ./lib rS foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
 # Check if ar-lib passes on @FILE with "r"
 opts=`./ar-lib ./lib r foo.lib @list`
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
@@ -62,6 +79,11 @@ test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
 opts=`./ar-lib ./lib t foo.lib`
 test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
 
+# Check if ar-lib accepts "v" as a modifier.
+# NOTE: "v" should have an effect, but currently doesn't.
+opts=`./ar-lib ./lib tv foo.lib`
+test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
+
 # Check if ar-lib can extract archive members with "x"
 touch fake.lib
 opts=`./ar-lib ./lib x fake.lib`
@@ -84,4 +106,8 @@ touch fake2.lib
 opts=`./ar-lib ./lib x fake2.lib`
 test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
 
+# Check if ar-lib accepts "s" as an action.
+opts=`./ar-lib ./lib s foo.lib`
+test x"$opts" = x
+
 :
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 1a185e7..3a87d40 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -26,8 +26,8 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_PROG_AR
 #x AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 6e8f23b..420b56b 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -390,6 +390,9 @@ extra8.test \
 extra10.test \
 extra11.test \
 extra12.test \
+extra-portability.test \
+extra-portability2.test \
+extra-portability3.test \
 extradep.test \
 extradep2.test \
 f90only.test \
@@ -904,6 +907,7 @@ vala4.test \
 vala5.test \
 vala-vpath.test \
 vala-mix.test \
+vala-mix2.test \
 vars.test \
 vars3.test \
 vartar.test \
diff --git a/tests/vala-mix.test b/tests/vala-mix2.test
similarity index 64%
copy from tests/vala-mix.test
copy to tests/vala-mix2.test
index 73a07d9..88d2818 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix2.test
@@ -14,40 +14,28 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Vala sources and C sources in the same program.  Functional test.
+# Vala sources, C and C++ sources and C and C++ headers in the same
+# program.  Functional test.  See automake bug#10894.
 
-required='valac cc GNUmake'
+required='valac cc c++ GNUmake'
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
+AC_PROG_CXX
 AM_PROG_VALAC
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz mu
+bin_PROGRAMS = zardoz
 AM_VALAFLAGS = --profile=posix
-zardoz_SOURCES = foo.vala bar.c
-mu_SOURCES = 1.vala 2.c
-mu_VALAFLAGS = $(AM_VALAFLAGS) --main=run
-mu_CFLAGS = -DHAVE_MU
+zardoz_SOURCES = zardoz.vala foo.h bar.c baz.c zen.hh master.cxx
 END
 
-if cross_compiling; then :; else
-  unindent >> Makefile.am <<'END'
-    check-local:
-       ./zardoz
-       ./mu
-       ./zardoz | grep "foo is alive"
-       ./mu | grep "Howdy, World!"
-END
-fi
-
-cat > foo.vala <<'END'
+cat > zardoz.vala <<'END'
 int main ()
 {
   stdout.printf ("foo is alive\n");
@@ -55,23 +43,30 @@ int main ()
 }
 END
 
-echo 'extern int i = 0;' > bar.c
+cat > foo.h <<'END'
+int foo;
+int bar (void);
+int baz (void);
+END
 
-cat > 1.vala <<'END'
-int run ()
-{
-  stdout.printf ("Howdy, World!\n");
-  return 0;
-}
+cat > bar.c <<'END'
+#include "foo.h"
+int bar (void) { return foo + baz (); }
 END
 
-cat > 2.c <<'END'
-#ifdef HAVE_MU
-int all_is_ok = 1;
-#else
-#error "HAVE_MU no defined"
-chocke me
-#endif
+cat > baz.c <<'END'
+#include "foo.h"
+extern int foo = 0;
+int baz (void) { return 0; }
+END
+
+cat > zen.hh <<'END'
+#include <iostream>
+END
+
+cat > master.cxx <<'END'
+#include "zen.hh"
+void chatty (void) { std::cout << "Hello, stranger!\n"; }
 END
 
 $ACLOCAL
@@ -82,14 +77,11 @@ $AUTOCONF
 
 $MAKE all
 ls -l # For debugging.
-$MAKE check
 
 have_generated_files ()
 {
-  test -f mu_vala.stamp
   test -f zardoz_vala.stamp
-  test -f foo.c
-  test -f 1.c
+  test -f zardoz.c
 }
 
 # Our vala-related rules must create stamp files and intermediate
@@ -100,12 +92,24 @@ have_generated_files
 $MAKE -q
 $MAKE -n | $FGREP vala.stamp && Exit 1
 
+# But are triggered when they should.
+for file in zardoz.vala foo.h bar.c baz.c zen.hh master.cxx; do
+  $sleep
+  echo '& choke me !' >> $file
+  $MAKE && Exit 1
+  $sleep
+  sed '$d' $file > t
+  mv -f t $file
+  $MAKE
+done
+
 # Check the distribution.
 $MAKE distcheck
 
 # Stamp files and intermediate C files should *not* be removed
 # by "make clean".
 $MAKE clean
+ls -l # For debugging.
 have_generated_files
 
 # But stamp files should be removed by "maintainer-clean" (the


hooks/post-receive
-- 
GNU Automake



reply via email to

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