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-1726


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1726-ga23d5bd
Date: Fri, 13 Jan 2012 12:23:46 +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=a23d5bdc04af351b3fde8243b711601d049249d0

The branch, master has been updated
       via  a23d5bdc04af351b3fde8243b711601d049249d0 (commit)
       via  539cae3bb691b4cef90e3c1fdbce833093ed6203 (commit)
       via  dfb5e52f5f52fda733f1a6d27680fc347ba17286 (commit)
       via  f1df5481b9a51023b46390d7730c3a401a00e9fd (commit)
       via  657eed2e1b1f2e0fac19f4c840b72a71ec6e1141 (commit)
       via  e064ff7997a1425942fe32c0c0488f922fe1ea9a (commit)
       via  d850165e6c9722adf2b80442974f3ca014c35298 (commit)
       via  72f7e5de24468adfeded4b14eae97a839ae3b531 (commit)
       via  c7ee8c6db00ddc4cd90b9d44c5ccf3a90d26663b (commit)
      from  96fef7a389e922d6d9bd949396be4c76ead7f61d (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 a23d5bdc04af351b3fde8243b711601d049249d0
Merge: 96fef7a 539cae3
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 13 13:20:34 2012 +0100

    Merge branch 'maint'
    
    * maint:
      dist: avoid $(distdir) removal failure on MSYS/MinGW
      tests: fix spurious failure of 'get-sysconf.test'
      coverage: expose automake bug#10470 (distcheck-related)
      tests: make 'aclocal-install-absdir.test' executable
      tests: require GNU make in 'vala-vapth.test'
      vala: fix VPATH builds
      tests: fix some bugs in the vala-vpath test

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

Summary of changes:
 NEWS                              |    2 +
 THANKS                            |    1 +
 automake.in                       |    8 ++--
 lib/am/distdir.am                 |   16 +++++++--
 tests/Makefile.am                 |    1 -
 tests/distcheck-pr10470.test      |   61 +++++++++++++++++++++++++++++++++++++
 tests/list-of-tests.mk            |    1 +
 tests/vala-vpath.test             |   28 +++++++++++++----
 tests/vala2.test                  |    9 +++++-
 9 files changed, 111 insertions(+), 16 deletions(-)
 mode change 100644 => 100755 tests/aclocal-install-absdir.test
 create mode 100755 tests/distcheck-pr10470.test

diff --git a/NEWS b/NEWS
index d4b7ce2..a686d05 100644
--- a/NEWS
+++ b/NEWS
@@ -213,6 +213,8 @@ Bugs fixed in 1.11.2a:
     configure time, and cannot be overridden at make time with
     `make V=0' or `make V=1'.
 
+  - Vala support now works better in VPATH setups.
+
 
 New in 1.11.2:
 
diff --git a/THANKS b/THANKS
index d9b6663..fa1d4ac 100644
--- a/THANKS
+++ b/THANKS
@@ -319,6 +319,7 @@ Ronald Landheer             address@hidden
 Roumen Petrov          address@hidden
 Russ Allbery           address@hidden
 Rusty Ballinger                address@hidden
+Ryan Lortie            address@hidden
 Ryan T. Sammartino     address@hidden
 Sam Hocevar            address@hidden
 Sam Sirlin             address@hidden
diff --git a/automake.in b/automake.in
index aa65e56..7f2750c 100644
--- a/automake.in
+++ b/automake.in
@@ -5847,7 +5847,7 @@ sub lang_vala_finish_target ($$)
           $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  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
+            . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; 
\\\n"
            . "\tfi\n"
             if $file =~ s/(.*)\.vala$/$1.c/;
         }
@@ -5867,7 +5867,7 @@ sub lang_vala_finish_target ($$)
              $output_rules .= "\$(srcdir)/$headerfile: 
\$(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  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
+               . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(srcdir)/${derived}_vala.stamp; \\\n"
                . "\tfi\n";
 
              # valac is not used when building from dist tarballs
@@ -5900,8 +5900,8 @@ sub lang_vala_finish_target ($$)
   my $silent = silent_flag ();
 
   $output_rules .=
-    "${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
-    "\t${verbose}${compile} \$(${derived}_SOURCES)\n".
+    "\$(srcdir)/${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
+    "\t${verbose}cd \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
     "\t${silent}touch address@hidden";
 
   push_dist_common ("${derived}_vala.stamp");
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 72268cb..9b0a766 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-## 2010, 2011 Free Software Foundation, Inc.
+## 2010, 2011, 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
@@ -23,9 +23,17 @@ distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+## On MSYS (1.0.17) it is not possible to remove a directory that is in
+## use; so, if the first rm fails, we sleep some seconds and retry, to
+## give pending processes some time to exit and "release" the directory
+## before we remove it.  The value of "some seconds" is 5 for the moment,
+## which is mostly an arbitrary value, but seems high enough in practice.
+## See automake bug#10470.
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
 am__post_remove_distdir = $(am__remove_distdir)
 endif %?TOPDIR_P%
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bfd4337..5d5c254 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,7 +52,6 @@ pr8365-remake-timing.test \
 lex-subobj-nodep.test \
 remake-am-pr10111.test \
 remake-m4-pr10111.test \
-vala-vpath.test \
 txinfo5.test
 
 # Some testsuite-influential variables should be overridable from the
diff --git a/tests/aclocal-install-absdir.test 
b/tests/aclocal-install-absdir.test
old mode 100644
new mode 100755
diff --git a/tests/distcheck-pr10470.test b/tests/distcheck-pr10470.test
new file mode 100755
index 0000000..d3e4839
--- /dev/null
+++ b/tests/distcheck-pr10470.test
@@ -0,0 +1,61 @@
+#! /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/>.
+
+# Ensure "make distcheck" does not experience racy failures on
+# systems (like MinGW/MSYS) that cannot remove a directory "in use"
+# by a process (e.g., that is its "current working directory").
+# See automake bug#10470.
+
+am_parallel_tests=no
+. ./defs || Exit 1
+
+set -e
+
+mkdir foo.d
+sh -c "cd foo.d && sleep '4'" &
+# Without this sleep, the "rm -rf foo.d" below would reliably beat
+# the "cd foo.d" in the subshell above, and the test would be always
+# skipped, even on MinGW/MSYS.
+sleep '1'
+rm -rf foo.d && skip_ 'system is able to remove "in use" directories'
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<END
+TESTS = foo.test
+EXTRA_DIST= foo.test
+END
+
+cat > foo.test <<END
+#!/bin/sh
+sleep '4' &
+exit 0
+END
+chmod a+x foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+# We can build the distribution.
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
+# Sanity check: verify that our code has hit a problem removing
+# the distdir, but has recovered from it.
+grep "rm:.*$destdir" output || fatal_ "expected code path not covered"
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 8355b7f..4d57232 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -357,6 +357,7 @@ distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
 distcheck-override-infodir.test \
 distcheck-pr9579.test \
+distcheck-pr10470.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
index 9db9de0..8f2b677 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 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
@@ -17,10 +17,10 @@
 # Test to make sure vala support handles from-scratch VPATH builds.
 # See automake bug#8753.
 
-required="valac"
+required="valac GNUmake"
 . ./defs || Exit 1
 
-mkdir src
+set -e
 
 cat >> configure.in << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
@@ -29,17 +29,16 @@ AM_PROG_VALAC([0.7])
 AC_OUTPUT
 END
 
-
 cat > Makefile.am <<'END'
 bin_PROGRAMS = foo
+foo_VALAFLAGS = --profile=posix
 foo_SOURCES = hello.vala
 END
 
 cat > hello.vala <<'END'
 void main ()
 {
-  stdout.printf ("foo\n");
-  return 0;
+  stdout.printf ("foofoofoo\n");
 }
 END
 
@@ -51,6 +50,23 @@ mkdir build
 cd build
 ../configure || Exit 77
 $MAKE
+grep foofoofoo ../hello.c
 $MAKE distcheck
 
+# Rebuild rules work also in VPATH builds.
+cat > ../hello.vala <<'END'
+int main ()
+{
+  stdout.printf ("barbarbar\n");
+  return 0;
+}
+END
+
+$MAKE
+grep barbarbar ../hello.c
+
+# Rebuild rules are not uselessly triggered.
+$MAKE -q
+$MAKE -n | grep '\.stamp' && Exit 1
+
 :
diff --git a/tests/vala2.test b/tests/vala2.test
index 85534d9..2a320dd 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -76,6 +76,13 @@ $MAKE
 $MAKE distcheck
 
 # Test rebuild rules from builddir.
-touch ../src/zardoz.vala
+rm -f ../src/zardoz.c
 $MAKE
+grep 'Zardoz!' ../src/zardoz.c
+sed 's/Zardoz!/FooBar!/' ../src/zardoz.c > t
+mv -f t ../src/zardoz.c
+$MAKE
+grep 'FooBar!' ../src/zardoz.c
+grep 'Zardoz!' ../src/zardoz.c && Exit 1
 
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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