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.11b-34-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11b-34-g0c2cc2c
Date: Wed, 18 Apr 2012 08:32:26 +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=0c2cc2c9d171ef21ef54c87569837ff41cd09a9d

The branch, master has been updated
       via  0c2cc2c9d171ef21ef54c87569837ff41cd09a9d (commit)
       via  bee76ca37d0883404302661671567404d9c92917 (commit)
       via  1153b2be217e6acdb547b8c163ba8a3d150353de (commit)
       via  789a7723530968f4da48ed9438961b691cf48cc6 (commit)
       via  36f9451ee076f8e42159b3f6daed972deb60fa9e (commit)
       via  e31e6b51150cc46bcfdcfb7b05e43a6ec7e0f848 (commit)
      from  6f12912a2b1c207e8fb3d45d993cc81edc51be47 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 NEWS                            |    3 +
 automake.in                     |   27 ++++++----
 t/list-of-tests.mk              |    3 +-
 t/{vala2.sh => vala-headers.sh} |   70 +++++++++++++--------------
 t/vala-libs.sh                  |  100 +++++++++++++++++++++++++++++++++++++++
 t/vala-vpath.sh                 |   23 ++++++++-
 t/vala1.sh                      |   52 --------------------
 t/vala2.sh                      |   33 ++++++++++--
 t/vala3.sh                      |   14 +++---
 t/vala5.sh                      |   20 ++++++++
 10 files changed, 230 insertions(+), 115 deletions(-)
 copy t/{vala2.sh => vala-headers.sh} (60%)
 create mode 100755 t/vala-libs.sh
 delete mode 100755 t/vala1.sh

diff --git a/NEWS b/NEWS
index 9b487a0..142f805 100644
--- a/NEWS
+++ b/NEWS
@@ -236,6 +236,9 @@ Bugs fixed in 1.11c:
 
   - Automake's own build system finally have a real "installcheck" target.
 
+  - Vala-related cleanup rules are now more complete, and work better in
+    a VPATH setup.
+
   - Files listed with the AC_REQUIRE_AUX_FILE macro in configure.ac are
     now automatically distributed also if the directory of the auxiliary
     files coincides with the top-level directory.
diff --git a/automake.in b/automake.in
index 7930ff1..38e09dc 100644
--- a/automake.in
+++ b/automake.in
@@ -5826,12 +5826,16 @@ sub lang_vala_finish_target ($$)
   foreach my $vala_file (@vala_sources)
     {
       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/;
+      if ($c_file =~ s/(.*)\.vala$/$1.c/)
+        {
+          $c_file = "\$(srcdir)/$c_file";
+          $output_rules .= "$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";
+         $clean_files{$c_file} = MAINTAINER_CLEAN;
+        }
     }
 
   # Add rebuild rules for generated header and vapi files
@@ -5844,8 +5848,8 @@ sub lang_vala_finish_target ($$)
          if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header',
                                  '--vapi', '--internal-vapi', '--gir')))
            {
-             my $headerfile = $flag;
-             $output_rules .= "\$(srcdir)/$headerfile: 
\$(srcdir)/${derived}_vala.stamp\n"
+             my $headerfile = "\$(srcdir)/$flag";
+             $output_rules .= "$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  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(srcdir)/${derived}_vala.stamp; \\\n"
@@ -5870,7 +5874,7 @@ sub lang_vala_finish_target ($$)
 
   # VALAFLAGS is a user variable (per GNU Standards),
   # it should not be overridden in the Makefile...
-  check_user_variables ['VALAFLAGS'];
+  check_user_variables 'VALAFLAGS';
 
   my $dirname = dirname ($name);
 
@@ -5879,6 +5883,7 @@ sub lang_vala_finish_target ($$)
 
   my $verbose = verbose_flag ('VALAC');
   my $silent = silent_flag ();
+  my $stampfile = "\$(srcdir)/${derived}_vala.stamp";
 
   $output_rules .=
     "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
@@ -5892,9 +5897,9 @@ sub lang_vala_finish_target ($$)
     "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
     "\t${silent}mv -f address@hidden address@hidden";
 
-  push_dist_common ("${derived}_vala.stamp");
+  push_dist_common ($stampfile);
 
-  $clean_files{"${derived}_vala.stamp"} = MAINTAINER_CLEAN;
+  $clean_files{$stampfile} = MAINTAINER_CLEAN;
 }
 
 # Add output rules to invoke valac and create stamp file as a witness
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 707441f..ea77bc1 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1191,12 +1191,13 @@ t/upc.sh \
 t/upc2.sh \
 t/upc3.sh \
 t/vala.sh \
-t/vala1.sh \
 t/vala2.sh \
 t/vala3.sh \
 t/vala4.sh \
 t/vala5.sh \
 t/vala-vapi.sh \
+t/vala-headers.sh \
+t/vala-libs.sh \
 t/vala-vpath.sh \
 t/vala-mix.sh \
 t/vala-mix2.sh \
diff --git a/t/vala2.sh b/t/vala-headers.sh
similarity index 60%
copy from t/vala2.sh
copy to t/vala-headers.sh
index 2b140b5..ffb66d9 100755
--- a/t/vala2.sh
+++ b/t/vala-headers.sh
@@ -16,36 +16,41 @@
 
 # Test to make sure compiling Vala code really works with recursive make.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
-mkdir src
-
-cat >> 'configure.ac' << 'END'
+cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
-AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
-SUBDIRS = src
-END
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz quux
 
-cat > 'src/Makefile.am' <<'END'
-bin_PROGRAMS = zardoz
-zardoz_VALAFLAGS = -H zardoz.h
-zardoz_CFLAGS = $(GOBJECT_CFLAGS)
-zardoz_LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = zardoz.vala
+quux_SOURCES = quux.vala
+quux.vala: zardoz.vala
+       sed 's/Zardoz/Quux/' <zardoz.vala >quux.vala
+
+quux_VALAFLAGS = \
+  --header HDR.h \
+  --vapi hello.vapi
+
+zardoz_VALAFLAGS = \
+  -H foo.h \
+  --internal-header foo2.h \
+  --internal-vapi foo3.vapi
+
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 END
 
-cat > 'src/zardoz.vala' <<'END'
-using GLib;
+headers='HDR.h hello.vapi foo.h foo2.h foo3.vapi'
 
+cat > zardoz.vala << 'END'
+using GLib;
 public class Zardoz {
   public static void main () {
     stdout.printf ("Zardoz!\n");
@@ -53,8 +58,6 @@ public class Zardoz {
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -63,25 +66,20 @@ $AUTOMAKE -a
 $MAKE
 
 # Test rebuild rules.
-rm -f src/zardoz.h
-$MAKE -C src zardoz.h
 
-$MAKE distcheck
-$MAKE distclean
-mkdir build
-cd build
-../configure
-$MAKE
+for h in $headers; do
+  rm -f $h
+  $MAKE $h
+  test -f $h
+done
+
+rm -f $headers
+$MAKE $headers
+for h in $headers; do test -f $h; done
+
 $MAKE distcheck
 
-# Test rebuild rules from builddir.
-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
+$MAKE maintainer-clean
+for h in $headers; do test ! -f $h; done
 
 :
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
new file mode 100755
index 0000000..fa1d21b
--- /dev/null
+++ b/t/vala-libs.sh
@@ -0,0 +1,100 @@
+#! /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/>.
+
+# Building libraries (libtool and static) from Vala sources.
+# And use of vapi files to call C code from Vala.
+
+required="valac cc pkg-config libtoolize GNUmake"
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libmu.a
+lib_LTLIBRARIES = src/libzardoz.la
+libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
+libmu_a_CPPFLAGS = -DOKOKIMDEFINED=1
+libmu_a_VALAFLAGS = --profile=posix --vapidir=$(srcdir)
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+src_libzardoz_la_LIBADD = $(GOBJECT_LIBS)
+src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
+src/zardoz-bar.vala: src/zardoz-foo.vala
+       sed 's/Foo/Bar/g' $< >$@
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure || skip_ "configure failed"
+
+cat > mu2.c << 'END'
+#include "mu2.h"
+int mu2 (void)
+{
+  return OKOKIMDEFINED;
+}
+END
+
+cat > mu2.h << 'END'
+int mu2 (void);
+END
+
+cat > mu.vapi <<'END'
+[CCode (cheader_filename = "mu2.h", cname = "mu2")]
+public int c_mu2 ();
+END
+
+cat > mu.vala << 'END'
+int main ()
+{
+  stdout.printf ("mumumu\n");
+  return c_mu2 ();
+}
+END
+
+mkdir src
+cat > src/zardoz-foo.vala << 'END'
+using GLib;
+public class Foo {
+  public static void zap () {
+    stdout.printf ("FooFooFoo!\n");
+  }
+}
+END
+
+$MAKE
+test -f libmu.a
+test -f src/libzardoz.la
+$FGREP "mumumu" mu.c
+$FGREP "FooFooFoo" src/zardoz-foo.c
+$FGREP "BarBarBar" src/zardoz-bar.c
+test -f libmu_a_vala.stamp
+test -f src_libzardoz_la_vala.stamp
+
+$MAKE distcheck
+
+:
diff --git a/t/vala-vpath.sh b/t/vala-vpath.sh
index e1e2e66..ae2d792 100755
--- a/t/vala-vpath.sh
+++ b/t/vala-vpath.sh
@@ -28,9 +28,11 @@ AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-bin_PROGRAMS = foo
-foo_VALAFLAGS = --profile=posix
+bin_PROGRAMS = foo bar
+AM_VALAFLAGS = --profile=posix
 foo_SOURCES = hello.vala
+bar_VALAFLAGS = $(AM_VALAFLAGS) -H zardoz.h
+bar_SOURCES = goodbye.vala
 END
 
 cat > hello.vala <<'END'
@@ -39,6 +41,7 @@ void main ()
   stdout.printf ("foofoofoo\n");
 }
 END
+cp hello.vala goodbye.vala
 
 $ACLOCAL
 $AUTOCONF
@@ -49,10 +52,13 @@ cd build
 ../configure || Exit 77
 $MAKE
 test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
 grep foofoofoo ../hello.c
+test -f ../zardoz.h
 $MAKE distcheck
 
 # Rebuild rules work also in VPATH builds.
+
 cat > ../hello.vala <<'END'
 int main ()
 {
@@ -63,10 +69,23 @@ END
 
 $MAKE
 test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
 grep barbarbar ../hello.c
 
 # Rebuild rules are not uselessly triggered.
 $MAKE -q
 $MAKE -n | grep '\.stamp' && Exit 1
 
+# Cleanup rules work also in VPATH builds.
+$MAKE clean
+test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
+test -f ../zardoz.h
+test -f ../hello.c
+$MAKE maintainer-clean
+test ! -f ../zardoz.h
+test ! -f ../hello.c
+test ! -f ../foo_vala.stamp
+test ! -f ../bar_vala.stamp
+
 :
diff --git a/t/vala1.sh b/t/vala1.sh
deleted file mode 100755
index 9aca0fb..0000000
--- a/t/vala1.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 to make sure intermediate .c files are built from vala sources
-# in non-recursive automake mode.
-
-required="libtool"
-. ./defs || Exit 1
-
-cat >> 'configure.ac' << 'END'
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_LIBTOOL
-AM_PROG_VALAC
-AC_OUTPUT
-END
-
-cat > 'Makefile.am' <<'END'
-bin_PROGRAMS = src/zardoz
-src_zardoz_SOURCES = src/zardoz.vala
-
-lib_LTLIBRARIES = src/libzardoz.la
-src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
-END
-
-: > ltmain.sh
-: > config.sub
-: > config.guess
-
-$ACLOCAL
-$AUTOMAKE -a
-
-grep 'VALAC' Makefile.in
-grep 'src_zardoz_OBJECTS' Makefile.in
-grep 'src_libzardoz_la_OBJECTS' Makefile.in
-grep 'src_zardoz_vala.stamp' Makefile.in
-grep 'src_libzardoz_la_vala.stamp' Makefile.in
-grep 'zardoz\.c' Makefile.in
-grep 'src/zardoz-foo\.c' Makefile.in
diff --git a/t/vala2.sh b/t/vala2.sh
index 2b140b5..4ed1c79 100755
--- a/t/vala2.sh
+++ b/t/vala2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure compiling Vala code really works with recursive make.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
 mkdir src
@@ -24,7 +24,6 @@ mkdir src
 cat >> 'configure.ac' << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_CONFIG_FILES([src/Makefile])
@@ -53,8 +52,6 @@ public class Zardoz {
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -63,11 +60,28 @@ $AUTOMAKE -a
 $MAKE
 
 # Test rebuild rules.
+
 rm -f src/zardoz.h
 $MAKE -C src zardoz.h
+test -f src/zardoz.h
+rm -f src/zardoz.c
+$MAKE -C src
+test -f src/zardoz.c
+
+echo am--error > src/zardoz.h
+echo am--error > src/zardoz.c
+$sleep
+touch src/zardoz.vala
+$MAKE
+grep 'am--error' src/zardoz.[ch] && Exit 1
+
+# Check the distribution.
 
 $MAKE distcheck
 $MAKE distclean
+
+# Tru a VPATH setup.
+
 mkdir build
 cd build
 ../configure
@@ -75,11 +89,18 @@ $MAKE
 $MAKE distcheck
 
 # Test rebuild rules from builddir.
+
+rm -f ../src/zardoz.h
+$MAKE -C src ../../src/zardoz.h
+test -f ../src/zardoz.h
+
 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
+
+$sleep
+sed 's/Zardoz!/FooBar!/' ../src/zardoz.vala > t
+mv -f t ../src/zardoz.vala
 $MAKE
 grep 'FooBar!' ../src/zardoz.c
 grep 'Zardoz!' ../src/zardoz.c && Exit 1
diff --git a/t/vala3.sh b/t/vala3.sh
index af8fcb5..bb9bc15 100755
--- a/t/vala3.sh
+++ b/t/vala3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure compiling Vala code really works with non-recursive make.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
 mkdir src
@@ -24,7 +24,6 @@ mkdir src
 cat >> 'configure.ac' << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
@@ -47,16 +46,19 @@ src_zardoz_LDADD = $(GOBJECT_LIBS)
 src_zardoz_SOURCES = src/zardoz.vala
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 ./configure || skip_ "configure failure"
 $MAKE
+test -f src/zardoz.c
+test -f src_zardoz_vala.stamp
 $MAKE distcheck
-$MAKE distclean
+$MAKE maintainer-clean
+test ! -f src/zardoz.c
+test ! -f src_zardoz_vala.stamp
+
 mkdir build
 cd build
 ../configure
@@ -77,8 +79,6 @@ src_zardoz_LDADD = $(GOBJECT_LIBS)
 src_zardoz_SOURCES = src/zardoz.vala
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/t/vala5.sh b/t/vala5.sh
index 26f391a..0c45d1e 100755
--- a/t/vala5.sh
+++ b/t/vala5.sh
@@ -80,4 +80,24 @@ if cross_compiling; then :; else
   test `./src/bar` = bar
 fi
 
+# Test clean rules.
+
+cp config.status config.sav
+
+$MAKE clean
+test -f src/xfoo.c
+test -f src/xbar.c
+
+$MAKE distclean
+test -f src/xfoo.c
+test -f src/xbar.c
+
+# Re-create Makefile.
+mv config.sav config.status
+./config.status
+
+$MAKE maintainer-clean
+test ! -f src/xfoo.c
+test ! -f src/xbar.c
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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