automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-775-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-775-g54ac5d4
Date: Thu, 12 Apr 2012 12:25:48 +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=54ac5d47f719b4db1fe96e28e4b7218e70a877cc

The branch, maint has been updated
       via  54ac5d47f719b4db1fe96e28e4b7218e70a877cc (commit)
       via  c12161817a71b7ab5410896294ac44254e002d3b (commit)
       via  7b3199fb4bdcff7304223e0a20808ed7d5681f31 (commit)
       via  072071c7d1c20fc1c85ee1e09796a08f6504d1d0 (commit)
      from  d714ec513745fe50c03d49c9ab6481ce36d3a27e (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 54ac5d47f719b4db1fe96e28e4b7218e70a877cc
Merge: 7b3199f c121618
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 12 14:14:04 2012 +0200

    Merge branches 'vala-fix-pr11222' and 'vala-fix-pr11229' into maint
    
    * vala-fix-pr11222:
      vala: fix vapi files handling
      vala: test vapi files handling (still failing)
    
    * vala-fix-pr11229:
      vala: fix distcheck with c/vala mixed projects

commit c12161817a71b7ab5410896294ac44254e002d3b
Author: Marc-Antoine Perennou <address@hidden>
Date:   Thu Apr 12 13:32:58 2012 +0200

    vala: fix distcheck with c/vala mixed projects
    
    Fixes automake bug#11229.
    
    * automake.in (lang_vala_finish_target): Return early if the
    current '_SOURCES' variable does not contain any '.vala' nor
    '.vapi' source.  Otherwise, the vala compiler will be called
    without arguments, causing an error.
    * tests/vala-mix.test: Enhance to catch the fixed bug.
    
    Copyright-paperwork-exempt: yes
    Signed-off-by: Marc-Antoine Perennou <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 7b3199fb4bdcff7304223e0a20808ed7d5681f31
Author: Marc-Antoine Perennou <address@hidden>
Date:   Wed Apr 11 11:18:31 2012 +0200

    vala: fix vapi files handling
    
    Fixes automake bug#11222.
    
    Issue introduced in commit 'v1.11-696-g51f61df' of 27-02-2012,
    "vala: fix 'valac' calls for projects with mixed Vala/C", which
    fixed automake bug#10894.
    
    * automake.in (lang_vala_finish_target): Also recognize '.vapi'
    as an extension for vala input files.
    * tests/list-of-tests.mk (XFAIL_TESTS): Remove 'vala-vapi.test'.
    
    Copyright-paperwork-exempt: yes
    Signed-off-by: Marc-Antoine Perennou <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 072071c7d1c20fc1c85ee1e09796a08f6504d1d0
Author: Stefano Lattarini <address@hidden>
Date:   Thu Apr 12 00:40:34 2012 +0200

    vala: test vapi files handling (still failing)
    
    Exposes automake bug#11222.
    
    * tests/vala-vapi.test: New test, still failing.
    * tests/list-of-tests.mk (handwritten_TESTS): Add it.
    (XFAIL_TESTS): Likewise.
    * THANKS: Update.
    
    Copyright-paperwork-exempt: yes
    Co-authored-by: Marc-Antoine Perennou <address@hidden>
    Signed-off-by: Marc-Antoine Perennou <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

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

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

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]