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: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.4-6-g4be33be
Date: Thu, 12 Apr 2012 16:16:47 +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=4be33be5b4c3d90b6062702d1600ba24dfacef64

The branch, branch-1.11 has been updated
       via  4be33be5b4c3d90b6062702d1600ba24dfacef64 (commit)
       via  1c69ac27654f17a7aefedccc3792c5280c703372 (commit)
       via  54ac5d47f719b4db1fe96e28e4b7218e70a877cc (commit)
       via  c12161817a71b7ab5410896294ac44254e002d3b (commit)
       via  7b3199fb4bdcff7304223e0a20808ed7d5681f31 (commit)
       via  072071c7d1c20fc1c85ee1e09796a08f6504d1d0 (commit)
      from  9de0c893834c1d9abe11dd0eb57d9b5461e12c35 (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 4be33be5b4c3d90b6062702d1600ba24dfacef64
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 12 17:49:26 2012 +0200

    news: document fixes for bug#11222 and bug#11229
    
    * NEWS (Bugs fixed in 1.11.5): New, documenting the fixes.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1c69ac27654f17a7aefedccc3792c5280c703372
Merge: 9de0c89 54ac5d4
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 12 17:47:36 2012 +0200

    Merge branch 'maint' into branch-1.11
    
    * maint:
      vala: fix distcheck with c/vala mixed projects
      vala: fix vapi files handling
      vala: test vapi files handling (still failing)
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 NEWS                   |   12 ++++++
 THANKS                 |    1 +
 automake.in            |    8 +++-
 tests/list-of-tests.mk |    1 +
 tests/vala-mix.test    |   11 +++++-
 tests/vala-vapi.test   |   91 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 121 insertions(+), 3 deletions(-)
 create mode 100755 tests/vala-vapi.test

diff --git a/NEWS b/NEWS
index cbd113d..af227f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+Bugs fixed in 1.11.5:
+
+* Bugs introduced by 1.11.3:
+
+  - Vala files with '.vapi' extension are now recognized and handled
+    correctly again.  See automake bug#11222.
+
+  - Vala support work again for projects that contain some program
+    built from '.vala' (and possibly '.c') sources and some other
+    program built from '.c' sources *only*.  See automake bug#11229.
+
+
 New in 1.11.4:
 
 * WARNING: Future backward-incompatibilities!
diff --git a/THANKS b/THANKS
index a2091ab..e584fa7 100644
--- a/THANKS
+++ b/THANKS
@@ -215,6 +215,7 @@ Manu Rouat          address@hidden
 Marcus Brinkmann       address@hidden
 Marcus G. Daniels      address@hidden
 Marius Vollmer         address@hidden
+Marc-Antoine Perennou  address@hidden
 Mark D. Baushke                address@hidden
 Mark Eichin            address@hidden
 Mark Elbrecht          address@hidden
diff --git a/automake.in b/automake.in
index 08b3300..921a6ae 100644
--- a/automake.in
+++ b/automake.in
@@ -6039,16 +6039,20 @@ sub lang_vala_finish_target ($$)
   my $var = var "${derived}_SOURCES";
   return unless $var;
 
-  my @vala_sources = grep { /\.vala$/ } ($var->value_as_list_recursive);
+  my @vala_sources = grep { /\.(vala|vapi)$/ } ($var->value_as_list_recursive);
+
+  # For automake bug#11229.
+  return unless @vala_sources;
 
   foreach my $vala_file (@vala_sources)
     {
-      (my $c_file = $vala_file) =~ s/(.*)\.vala$/$1.c/;
+      my $c_file = $vala_file;
       $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"
+        if $c_file =~ s/(.*)\.vala$/$1.c/;
     }
 
   # Add rebuild rules for generated header and vapi files
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 2548174..c344171 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -929,6 +929,7 @@ vala2.test \
 vala3.test \
 vala4.test \
 vala5.test \
+vala-vapi.test \
 vala-vpath.test \
 vala-mix.test \
 vala-mix2.test \
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
index 012b36a..fe48f26 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix.test
@@ -29,12 +29,13 @@ AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz mu
+bin_PROGRAMS = zardoz mu baz
 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
+baz_SOURCES = baz.c
 END
 
 if cross_compiling; then :; else
@@ -74,6 +75,14 @@ chocke me
 #endif
 END
 
+# For automake bug#11229.
+cat > baz.c <<'END'
+int main (void)
+{
+  return 0;
+}
+END
+
 $ACLOCAL
 $AUTOMAKE -a
 $AUTOCONF
diff --git a/tests/vala-vapi.test b/tests/vala-vapi.test
new file mode 100755
index 0000000..46e0dd4
--- /dev/null
+++ b/tests/vala-vapi.test
@@ -0,0 +1,91 @@
+#! /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/>.
+
+# Test and that vapi files are correctly handled by Vala support.
+
+required='valac cc GNUmake'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_VALAC([0.7.3])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+AM_VALAFLAGS = --profile=posix
+zardoz_SOURCES = zardoz.vala foo.vapi foo.h
+END
+
+cat > zardoz.vala <<'END'
+int main ()
+{
+    stdout.printf (BARBAR);
+    return 0;
+}
+END
+
+echo '#define BARBAR "Zardoz!\n"' > foo.h
+
+cat > foo.vapi <<'END'
+[CCode (cprefix="", lower_case_cprefix="", cheader_filename="foo.h")]
+public const string BARBAR;
+END
+
+if cross_compiling; then :; else
+  unindent >> Makefile.am <<'END'
+    check-local: test2
+    .PHONY: test1 test2
+    test1:
+       ./zardoz
+       ./zardoz | grep 'Zardoz!'
+    test2:
+       ./zardoz
+       ./zardoz | grep 'Quux!'
+END
+fi
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure --enable-dependency-tracking
+
+$MAKE
+ls -l        # For debugging.
+cat zardoz.c # Likewise.
+grep 'BARBAR' zardoz.c
+$MAKE test1
+
+# Simple check on remake rules.
+$sleep
+echo '#define BAZBAZ "Quux!\n"' > foo.h
+sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || Exit 99
+$MAKE && Exit 1
+sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || Exit 99
+$MAKE
+cat zardoz.c # For debugging.
+grep 'BAZBAZ' zardoz.c
+$MAKE test2
+
+# Check the distribution.
+$MAKE distcheck
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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