automake
[Top][All Lists]
Advanced

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

bugfix release 1.11.5


From: Stefano Lattarini
Subject: bugfix release 1.11.5
Date: Thu, 12 Apr 2012 20:25:56 +0200

Hello automakers.

In consideration of the two serious bugs recently fixed in Automake's
Vala support (see bugs #1122 and #11229), I intend to release a bugfix
release tomorrow if there is no objection.  Below is a screenshot of
the (pretty minimal) differences between the tip of the 'branch-1.11'
branch and the v1.11.4 release.  If anyone has suggestions or objections,
please speak up now.

Thanks,
  Stefano

-*-*-

$ git diff v1.11.4 branch-1.11

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
+
+:



reply via email to

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