automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, next, updated. v1.10b-32-ga


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, next, updated. v1.10b-32-gad9df85
Date: Sun, 19 Apr 2009 06:25:36 +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=ad9df85096b88b2a75c8d1e004a5a896f2dd9125

The branch, next has been updated
       via  ad9df85096b88b2a75c8d1e004a5a896f2dd9125 (commit)
       via  00db19509be4d4e7b64d912e09b740e2e15e02f8 (commit)
       via  62796cb90bf2c7db7326923e31b654a1ca0681a4 (commit)
       via  6c4b250d8697a342fd9897e86d92ca10f67bb1ed (commit)
       via  ae4ab510f17e57b6a4998c590df7566fb47d73a9 (commit)
       via  da239edeee81b4794025de2d9370f733d3423a59 (commit)
       via  2749b1e73514dae4e506ec8922afb0fb05c25956 (commit)
      from  4e9c77ba9ab740869da022ce973aec265bb90697 (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 ad9df85096b88b2a75c8d1e004a5a896f2dd9125
Merge: 4e9c77ba9ab740869da022ce973aec265bb90697 
00db19509be4d4e7b64d912e09b740e2e15e02f8
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Apr 19 08:09:13 2009 +0200

    Merge branch 'mh-vala-support' into next
    
    * mh-vala-support:
      More minor fixups to vala support.
      Improve Vala support.
      Minor fixups for Vala support.
      Support Vala in non-recursive builds; more tests and fixes.
      Initial support for the vala programming language.

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

Summary of changes:
 ChangeLog                           |   68 +++++++++++++++++++++
 NEWS                                |    5 ++
 THANKS                              |    2 +
 automake.in                         |  111 ++++++++++++++++++++++++++++++++++-
 doc/automake.texi                   |   54 +++++++++++++++++
 lib/am/Makefile.am                  |    1 +
 lib/am/Makefile.in                  |    1 +
 lib/am/{header.am => vala.am}       |    6 +-
 m4/Makefile.am                      |    3 +-
 m4/Makefile.in                      |    3 +-
 m4/vala.m4                          |   29 +++++++++
 tests/Makefile.am                   |    9 +++-
 tests/Makefile.in                   |    9 +++-
 tests/{cond43.test => vala.test}    |   54 +++++++++++------
 tests/vala1.test                    |   58 ++++++++++++++++++
 tests/{suffix13.test => vala2.test} |   70 +++++++++++-----------
 tests/vala3.test                    |  103 ++++++++++++++++++++++++++++++++
 tests/{cond43.test => vala4.test}   |   56 +++++++++++------
 tests/vala5.test                    |   74 +++++++++++++++++++++++
 19 files changed, 633 insertions(+), 83 deletions(-)
 copy lib/am/{header.am => vala.am} (83%)
 create mode 100644 m4/vala.m4
 copy tests/{cond43.test => vala.test} (50%)
 create mode 100755 tests/vala1.test
 copy tests/{suffix13.test => vala2.test} (52%)
 create mode 100755 tests/vala3.test
 copy tests/{cond43.test => vala4.test} (53%)
 create mode 100755 tests/vala5.test

diff --git a/ChangeLog b/ChangeLog
index 8dae4db..99dd57f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,71 @@
+2009-04-19  Ralf Wildenhues  <address@hidden>
+
+       More minor fixups to vala support.
+       * automake.in (lang_vala_finish_target): Fix typo in comment.
+       * doc/automake.texi (Vala Support): Fix typo.  Declare vala
+       support as "initial".
+       * NEWS: Likewise, declare vala support as "initial".
+
+2009-04-05  Jürg Billeter  <address@hidden>
+
+       Improve Vala support.
+       * automake.in: Update to Vala 0.7.0 semantics, recover from removal
+       of built sources, support silent-rules, drop _PKGNAME variables
+       * doc/automake.texi, NEWS: Update.
+       * lib/am/vala.am: Bump copyright years.
+       * m4/vala.m4: Likewise.
+       * tests/vala.test: Remove obsolete grep tests.
+       * tests/vala1.test: Likewise.
+       * tests/vala2.test: Test full build, distcheck, and distclean.
+       * tests/vala3.test: Likewise, also test with subdir-objects.
+       * tests/vala4.test: Bump copyright years.
+       * tests/vala5.test: New test for per-target flags, expected to fail.
+       * tests/Makefile.am: Update.
+       * THANKS: Update.
+
+2008-10-10  Ralf Wildenhues  <address@hidden>
+
+       Minor fixups for Vala support.
+       * automake.in: $(VALAFLAGS) comes after $(AM_VALAFLAGS).
+       * doc/automake.texi (Vala Support): Add some references,
+       document AM_VALAFLAGS, streamline a bit.
+       * lib/am/vala.am: Copyright blurb.
+       * m4/vala.m4 (AM_PROG_VALAC): Rewrite using AS_VERSION_COMPARE.
+       * tests/vala.test: Fix minor nits.
+       * tests/vala1.test: Likewise.
+       * tests/vala2.test: Likewise.
+       * tests/vala3.test: Likewise.
+       * tests/vala4.test: New test, for version argument of
+       AM_PROG_VALAC.
+       * tests/Makefile.am: Update.
+
+2008-10-09  Mathias Hasselmann  <address@hidden>
+
+       * automake.in: Support Vala in non-recursive builds. Make sure
+       foo_VALAFLAGS really use used. Inject --library switch when building
+       Vala libraries.
+       * doc/automake.texi, NEWS: Document Vala support.
+       * m4/vala.m4: Rename AC_PROG_VALAC to AM_PROG_VALAC.
+       * tests/Makefile.am: Additional Vala tests.
+       * tests/vala.test: Also test VALAFLAGS support.
+       * tests/vala1.test: Test non-recursive Vala support.
+       * tests/vala2.test: Test _PKGNAME variables.
+       * tests/vala3.test: Test compiling of C code generated by Vala.
+
+2008-10-09  Mathias Hasselmann  <address@hidden>
+
+       Initial support for the vala programming language.
+       * automake.in: Add %known_libraries, lang_vala_rewrite,
+       lang_vala_finish and lang_vala_target_hook to support the Vala
+       programming language. Register Vala language hooks.
+       * lib/am/vala.am: Empty rules file to prevent creation of depend2
+       based rules for Vala code.
+       * lib/am/Makefile.am (dist_am_DATA): Add vala.am.
+       * m4/vala.m4: Provide AC_PROG_VALAC for detecting the Vala compiler.
+       * m4/Makefile.am (dist_m4data_DATA): Add vala.m4.
+       * tests/vala.test: Test Vala support.
+       * tests/Makefile.am: Update.
+
 2009-04-14  Ralf Wildenhues  <address@hidden>
 
        testsuite: do not fail on systems without read permissions.
diff --git a/NEWS b/NEWS
index db639f9..2c69e46 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 New in 1.10c:
 
+* Languages changes:
+
+  - There is initial support for the Vala programming language, when using
+    Vala 0.7.0 or later.
+
 * Miscellaneous Changes:
 
   - In 1.10b, the `parallel-tests' driver introduced per-extension test
diff --git a/THANKS b/THANKS
index fda6f74..163d40e 100644
--- a/THANKS
+++ b/THANKS
@@ -165,6 +165,7 @@ Juergen A. Erhard   address@hidden
 Juergen Keil           address@hidden
 Juergen Leising                address@hidden
 Julien Sopena          address@hidden
+Jürg Billeter         address@hidden
 Karl Berry             address@hidden
 Karl Heuer             address@hidden
 Kelley Cook            address@hidden
@@ -203,6 +204,7 @@ Martin Frydl                address@hidden
 Martin Waitz           address@hidden
 Mathias Doreille       address@hidden
 Mathias Froehlich      address@hidden
+Mathias Hasselmann     address@hidden
 Matt Leach             address@hidden
 Matthew D. Langston    address@hidden
 Matthias Andree                address@hidden
diff --git a/automake.in b/automake.in
index 137b8da..4656032 100755
--- a/automake.in
+++ b/automake.in
@@ -115,7 +115,7 @@ sub finish ($)
   my ($self) = @_;
   if (defined $self->_finish)
     {
-      &{$self->_finish} ();
+      &{$self->_finish} (@_);
     }
 }
 
@@ -572,6 +572,7 @@ my @dist_targets;
 # Keep track of all programs declared in this Makefile, without
 # $(EXEEXT).  @substitutions@ are not listed.
 my %known_programs;
+my %known_libraries;
 
 # Keys in this hash are the basenames of files which must depend on
 # ansi2knr.  Values are either the empty string, or the directory in
@@ -702,6 +703,7 @@ sub initialize_per_input ()
     @dist_targets = ();
 
     %known_programs = ();
+    %known_libraries= ();
 
     %de_ansi_files = ();
 
@@ -809,6 +811,22 @@ register_language ('name' => 'header',
                   # Nothing to do.
                   '_finish' => sub { });
 
+# Vala
+register_language ('name' => 'vala',
+                  'Name' => 'Vala',
+                  'config_vars' => ['VALAC'],
+                  'flags' => ['VALAFLAGS'],
+                  'compile' => '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)',
+                  'ccer' => 'VALAC',
+                  'compiler' => 'VALACOMPILE',
+                  'extensions' => ['.vala'],
+                  'output_extensions' => sub { (my $ext = $_[0]) =~ s/vala$/c/;
+                                               return ($ext,) },
+                  'rule_file' => 'vala',
+                  '_finish' => \&lang_vala_finish,
+                  '_target_hook' => \&lang_vala_target_hook,
+                  'nodist_specific' => 1);
+
 # Yacc (C & C++).
 register_language ('name' => 'yacc',
                   'Name' => 'Yacc',
@@ -2711,6 +2729,8 @@ sub handle_libraries
               . "did you mean `$suggestion'?")
        }
 
+      ($known_libraries{$onelib} = $bn) =~ s/\.a$//;
+
       $where->push_context ("while processing library `$onelib'");
       $where->set (INTERNAL->get);
 
@@ -2916,6 +2936,8 @@ sub handle_ltlibraries
               . "did you mean `$suggestion'?")
        }
 
+      ($known_libraries{$onelib} = $bn) =~ s/\.la$//;
+
       $where->push_context ("while processing Libtool library `$onelib'");
       $where->set (INTERNAL->get);
 
@@ -5743,6 +5765,15 @@ sub lang_header_rewrite
     return LANG_IGNORE;
 }
 
+# Rewrite a single Vala source file.
+sub lang_vala_rewrite
+{
+    my ($directory, $base, $ext) = @_;
+
+    (my $newext = $ext) =~ s/vala$/c/;
+    return (LANG_SUBDIR, $newext);
+}
+
 # Rewrite a single yacc file.
 sub lang_yacc_rewrite
 {
@@ -5901,6 +5932,84 @@ sub lang_c_finish
     }
 }
 
+sub lang_vala_finish_target ($$)
+{
+  my ($self, $name) = @_;
+
+  my $derived = canonicalize ($name);
+  my $varname = $derived . '_SOURCES';
+  my $var = var ($varname);
+
+  if ($var)
+    {
+      foreach my $file ($var->value_as_list_recursive)
+        {
+          $output_rules .= "$file: ${derived}_vala.stamp\n".
+            "address@hidden test -f \$@; then :; else \\\n".
+            "\t  rm -f ${derived}_vala.stamp; \\\n".
+            "\t  \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n".
+            "\tfi\n"
+            if $file =~ s/(.*)\.vala$/$1.c/;
+        }
+    }
+
+  my $compile = $self->compile;
+
+  # Rewrite each occurrence of `AM_$flag' in the compile
+  # rule into `${derived}_$flag' if it exists.
+  for my $flag (@{$self->flags})
+    {
+      my $val = "${derived}_$flag";
+      $compile =~ s/\(AM_$flag\)/\($val\)/
+        if set_seen ($val);
+    }
+
+  my $dirname = dirname ($name);
+
+  # Only generate C code, do not run C compiler
+  $compile .= " -C";
+
+  my $verbose = verbose_flag ('VALAC');
+  my $silent = silent_flag ();
+
+  $output_rules .=
+    "${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
+    "\t${verbose}${compile} \$(${derived}_SOURCES)\n".
+    "\t${silent}touch address@hidden";
+
+  push_dist_common ("${derived}_vala.stamp");
+
+  $clean_files{"${derived}_vala.stamp"} = MAINTAINER_CLEAN;
+}
+
+# Add output rules to invoke valac and create stamp file as a witness
+# to handle multiple outputs. This function is called after all source
+# file processing is done.
+sub lang_vala_finish
+{
+  my ($self) = @_;
+
+  foreach my $prog (keys %known_programs)
+    {
+      lang_vala_finish_target ($self, $prog);
+    }
+
+  while (my ($name) = each %known_libraries)
+    {
+      lang_vala_finish_target ($self, $name);
+    }
+}
+
+# The built .c files should be cleaned only on maintainer-clean
+# as the .c files are distributed. This function is called for each
+# .vala source file.
+sub lang_vala_target_hook
+{
+  my ($self, $aggregate, $output, $input, %transform) = @_;
+
+  $clean_files{$output} = MAINTAINER_CLEAN;
+}
+
 # This is a yacc helper which is called whenever we have decided to
 # compile a yacc file.
 sub lang_yacc_target_hook
diff --git a/doc/automake.texi b/doc/automake.texi
index 0094fa0..a52357b 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -224,6 +224,7 @@ Building Programs and Libraries
 * Fortran 77 Support::          Compiling Fortran 77 sources
 * Fortran 9x Support::          Compiling Fortran 9x sources
 * Java Support::                Compiling Java sources
+* Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
 * ANSI::                        Automatic de-ANSI-fication (obsolete)
 * Dependencies::                Automatic dependency tracking
@@ -4533,6 +4534,7 @@ to build programs and libraries.
 * Fortran 77 Support::          Compiling Fortran 77 sources
 * Fortran 9x Support::          Compiling Fortran 9x sources
 * Java Support::                Compiling Java sources
+* Vala Support::                Compiling Vala sources
 * Support for Other Languages::  Compiling other languages
 * ANSI::                        Automatic de-ANSI-fication (obsolete)
 * Dependencies::                Automatic dependency tracking
@@ -6594,6 +6596,58 @@ using the @option{--main=} option.  The easiest way to 
do this is to use
 the @code{_LDFLAGS} variable for the program.
 
 
address@hidden Vala Support
address@hidden  node-name,  next,  previous,  up
address@hidden Vala Support
+
address@hidden Vala Support
address@hidden Support for Vala
+
+Automake provides initial support for Vala
+(@uref{http://www.vala-project.org/}).
+This requires valac version 0.7.0 or later.
+
address@hidden
+foo_SOURCES = foo.vala bar.vala zardoc.c
address@hidden example
+
+Any @file{.vala} file listed in a @code{_SOURCES} variable will be
+compiled into C code by the Vala compiler. The generated @file{.c} files are
+distributed. The end user does not need to have a Vala compiler installed.
+
+Automake ships with an Autoconf macro called @code{AM_PROG_VALAC}
+that will locate the Vala compiler and optionally check its version
+number.
+
address@hidden AM_PROG_VALAC (@ovar{MINIMUM-VERSION})
+Try to find a Vala compiler in @env{PATH}. If it is found, the variable
address@hidden is set. Optionally a minimum release number of the compiler
+can be requested:
+
address@hidden
+AM_PROG_VALAC([0.7.0])
address@hidden example
address@hidden defmac
+
+There are a few variables that are used when compiling Vala sources:
+
address@hidden @code
address@hidden VALAC
+Path to the the Vala compiler.
+
address@hidden VALAFLAGS
+Additional arguments for the Vala compiler.
+
address@hidden AM_VALAFLAGS
+The maintainer's variant of @code{VALAFLAGS}.
+
address@hidden
+lib_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = foo.vala
address@hidden example
address@hidden vtable
+
+
 @node Support for Other Languages
 @comment  node-name,  next,  previous,  up
 @section Support for Other Languages
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index b1cae3b..1ab2f31 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -60,4 +60,5 @@ tags.am \
 texi-vers.am \
 texibuild.am \
 texinfos.am \
+vala.am \
 yacc.am
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 66490fe..ce96885 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -205,6 +205,7 @@ tags.am \
 texi-vers.am \
 texibuild.am \
 texinfos.am \
+vala.am \
 yacc.am
 
 all: all-am
diff --git a/lib/am/header.am b/lib/am/vala.am
similarity index 83%
copy from lib/am/header.am
copy to lib/am/vala.am
index 17dfdb9..ed12dc5 100644
--- a/lib/am/header.am
+++ b/lib/am/vala.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003 Free Software 
Foundation, Inc.
+## Copyright (C) 2008, 2009  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
@@ -14,6 +14,4 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
-## Exactly the same as data.am.
-include data.am
+## There is no rule here.  :-)
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 0ce26d1..b8194d6 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -56,7 +56,8 @@ silent.m4 \
 strip.m4 \
 substnot.m4 \
 tar.m4 \
-upc.m4
+upc.m4 \
+vala.m4
 
 EXTRA_DIST = dirlist amversion.in
 
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 75c0909..7cc2c68 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -201,7 +201,8 @@ silent.m4 \
 strip.m4 \
 substnot.m4 \
 tar.m4 \
-upc.m4
+upc.m4 \
+vala.m4
 
 EXTRA_DIST = dirlist amversion.in
 all: all-am
diff --git a/m4/vala.m4 b/m4/vala.m4
new file mode 100644
index 0000000..d3f73a5
--- /dev/null
+++ b/m4/vala.m4
@@ -0,0 +1,29 @@
+# Autoconf support for the Vala compiler
+
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# Check whether the Vala compiler exists in `PATH'. If it is found, the
+# variable VALAC is set. Optionally a minimum release number of the
+# compiler can be requested.
+#
+# AM_PROG_VALAC([MINIMUM-VERSION])
+# --------------------------------
+AC_DEFUN([AM_PROG_VALAC],
+[AC_PATH_PROG([VALAC], [valac], [])
+ AS_IF([test -z "$VALAC"],
+   [AC_MSG_WARN([No Vala compiler found.  You will not be able to compile 
.vala source files.])],
+   [AS_IF([test -n "$1"],
+      [AC_MSG_CHECKING([$VALAC is at least version $1])
+       am__vala_version=`$VALAC --version`
+       AS_VERSION_COMPARE([$1], ["$am__vala_version"],
+         [AC_MSG_RESULT([yes])],
+         [AC_MSG_RESULT([yes])],
+         [AC_MSG_RESULT([no])
+          AC_MSG_ERROR([Vala $1 not found.])])])])
+])
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d90eb6c..5ac8dd4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,7 +4,8 @@ XFAIL_TESTS =                                   \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
-txinfo5.test
+txinfo5.test                                   \
+vala5.test
 
 include $(srcdir)/parallel-tests.am
 
@@ -692,6 +693,12 @@ unused.test \
 upc.test \
 upc2.test \
 upc3.test \
+vala.test \
+vala1.test \
+vala2.test \
+vala3.test \
+vala4.test \
+vala5.test \
 vars.test \
 vars3.test \
 vartar.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 836f253..3c090e6 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -228,7 +228,8 @@ XFAIL_TESTS = \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
-txinfo5.test
+txinfo5.test                                   \
+vala5.test
 
 parallel_tests = \
 check-p.test \
@@ -924,6 +925,12 @@ unused.test \
 upc.test \
 upc2.test \
 upc3.test \
+vala.test \
+vala1.test \
+vala2.test \
+vala3.test \
+vala4.test \
+vala5.test \
 vars.test \
 vars3.test \
 vartar.test \
diff --git a/tests/cond43.test b/tests/vala.test
similarity index 50%
copy from tests/cond43.test
copy to tests/vala.test
index d1a863d..a0e97ad 100755
--- a/tests/cond43.test
+++ b/tests/vala.test
@@ -1,5 +1,6 @@
-#!/bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,28 +19,41 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
+# Test to make sure intermediate .c files are built from vala source.
+
+required="libtool"
+. ./defs || Exit 1
 
-. ./defs
 set -e
 
-cat >>configure.in <<'END'
-AM_CONDITIONAL([COND1], [:])
-AM_CONDITIONAL([COND2], [:])
-AM_COND_IF([COND1],
-          AM_COND_IF([COND2], [:])
-)
+cat >> 'configure.in' << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AM_PROG_VALAC
 AC_OUTPUT
 END
-: >Makefile.am
+
+cat > 'Makefile.am' <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.vala
+zardoz_VALAFLAGS = --debug
+
+lib_LTLIBRARIES = libzardoz.la
+libzardoz_la_SOURCES = zardoz-foo.vala zardoz-bar.vala
+END
+
+: > ltmain.sh
+: > config.sub
+: > config.guess
 
 $ACLOCAL
-AUTOMAKE_fails
-
-sed '/.AM_COND_IF/{
-       s/^/[/
-       s/$/]/
-     }' < configure.in > configure.int
-mv -f configure.int configure.in
-rm -rf autom4te*.cache
-$AUTOMAKE
+$AUTOMAKE -a
+
+grep 'VALAC' Makefile.in
+grep 'am_zardoz_OBJECTS' Makefile.in
+grep 'am_libzardoz_la_OBJECTS' Makefile.in
+grep 'zardoz_vala.stamp' Makefile.in
+grep 'libzardoz_la_vala.stamp' Makefile.in
+grep 'zardoz\.c' Makefile.in
+grep 'zardoz-foo\.c' Makefile.in
+
diff --git a/tests/vala1.test b/tests/vala1.test
new file mode 100755
index 0000000..158adcf
--- /dev/null
+++ b/tests/vala1.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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 3, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test to make sure intermediate .c files are built from vala sources
+# in non-recursive automake mode.
+
+required="libtool"
+. ./defs || Exit 1
+
+set -e
+
+cat >> 'configure.in' << 'END'
+AC_PROG_CC
+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/tests/suffix13.test b/tests/vala2.test
similarity index 52%
copy from tests/suffix13.test
copy to tests/vala2.test
index df5f4d5..6209aa6 100755
--- a/tests/suffix13.test
+++ b/tests/vala2.test
@@ -1,11 +1,12 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2009  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # GNU Automake 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)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 #
 # GNU Automake is distributed in the hope that it will be useful,
@@ -18,58 +19,59 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Tests that Automake understands suffix rules with renamed objects
-# and subdir objects.
-# Reported by Florian Briegel.
+# Test to make sure compiling Vala code really works with recursive make.
 
+required="libtool libtoolize pkg-config valac gcc"
 . ./defs || Exit 1
 
 set -e
 
-cat >>configure.in <<EOF
+mkdir src
+
+cat >> 'configure.in' << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AM_PROG_VALAC
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
-EOF
-
-cat >Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-SUFFIXES = .baz .c
-.baz.c:
-       case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
-       cp $< $@
-
-DISTCLEANFILES = sub/bar.c
+END
 
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c sub/bar.baz
-foo_CFLAGS =
+cat > 'Makefile.am' <<'END'
+SUBDIRS = src
 END
 
-mkdir sub
-cat > sub/bar.baz <<'END'
-extern int foo ();
-int main () { return foo (); }
+cat > 'src/Makefile.am' <<'END'
+bin_PROGRAMS = zardoz
+zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+zardoz_LDADD = $(GOBJECT_LIBS)
+zardoz_SOURCES = zardoz.vala
 END
-cat > foo.c <<'END'
-int foo () { return 0; }
+
+cat > 'src/zardoz.vala' <<'END'
+using GLib;
+
+public class Zardoz {
+  public static void main () {
+    stdout.printf ("Zardoz!\n");
+  }
+}
 END
 
+libtoolize
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure
 $MAKE
-
 $MAKE distcheck
 $MAKE distclean
-
-# Should also work without subdir-objects
-
-sed '/subdir-objects/d' < Makefile.am > t
-mv -f t Makefile.am
-$AUTOMAKE --force
-./configure
+mkdir build
+cd build
+../configure
 $MAKE
 $MAKE distcheck
-:
+
diff --git a/tests/vala3.test b/tests/vala3.test
new file mode 100755
index 0000000..7815393
--- /dev/null
+++ b/tests/vala3.test
@@ -0,0 +1,103 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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 3, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test to make sure compiling Vala code really works with non-recursive make.
+
+required="libtool libtoolize pkg-config valac gcc"
+. ./defs || Exit 1
+
+set -e
+
+mkdir src
+
+cat >> 'configure.in' << '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.10])
+AC_OUTPUT
+END
+
+cat > 'src/zardoz.vala' <<'END'
+using GLib;
+
+public class Zardoz {
+  public static void main () {
+    stdout.printf ("Zardoz!\n");
+  }
+}
+END
+
+cat > 'Makefile.am' <<'END'
+bin_PROGRAMS = src/zardoz
+src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+src_zardoz_LDADD = $(GOBJECT_LIBS)
+src_zardoz_SOURCES = src/zardoz.vala
+END
+
+libtoolize
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure || Exit 77
+$MAKE
+$MAKE distcheck
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE distcheck
+
+cd ..
+rm -rf build
+
+# Try again with subdir-objects.
+
+cat > 'Makefile.am' <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+
+bin_PROGRAMS = src/zardoz
+src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+src_zardoz_LDADD = $(GOBJECT_LIBS)
+src_zardoz_SOURCES = src/zardoz.vala
+END
+
+libtoolize
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure || Exit 77
+$MAKE
+$MAKE distcheck
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE distcheck
+
+
diff --git a/tests/cond43.test b/tests/vala4.test
similarity index 53%
copy from tests/cond43.test
copy to tests/vala4.test
index d1a863d..1f9d2ca 100755
--- a/tests/cond43.test
+++ b/tests/vala4.test
@@ -1,5 +1,5 @@
-#!/bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+#! /bin/sh
+# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,28 +18,44 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
+# Test AM_PROG_VALAC.
+
+required=libtoolize
+. ./defs || Exit 1
 
-. ./defs
 set -e
 
-cat >>configure.in <<'END'
-AM_CONDITIONAL([COND1], [:])
-AM_CONDITIONAL([COND2], [:])
-AM_COND_IF([COND1],
-          AM_COND_IF([COND2], [:])
-)
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AM_PROG_VALAC([0.0.1])
 AC_OUTPUT
 END
-: >Makefile.am
 
+: > Makefile.am
+
+cat > valac << 'END'
+#! /bin/sh
+if test "x$1" = x--version; then
+  echo 1.2.3
+fi
+exit 0
+END
+chmod +x valac
+
+libtoolize
 $ACLOCAL
-AUTOMAKE_fails
-
-sed '/.AM_COND_IF/{
-       s/^/[/
-       s/$/]/
-     }' < configure.in > configure.int
-mv -f configure.int configure.in
-rm -rf autom4te*.cache
-$AUTOMAKE
+$AUTOMAKE -a
+$AUTOCONF
+./configure "VALAC=`pwd`/valac"
+
+sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([9999.9])/' < configure.in >t
+mv -f t configure.in
+$AUTOCONF --force
+./configure "VALAC=`pwd`/valac" && Exit 1
+
+sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([1.2.3])/' < configure.in >t
+mv -f t configure.in
+$AUTOCONF --force
+./configure "VALAC=`pwd`/valac"
+:
diff --git a/tests/vala5.test b/tests/vala5.test
new file mode 100755
index 0000000..7369186
--- /dev/null
+++ b/tests/vala5.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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 3, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test per-target flags, expected to fail.
+
+required="libtool libtoolize pkg-config valac gcc"
+. ./defs || Exit 1
+
+set -e
+
+mkdir src
+
+cat >> 'configure.in' << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AM_PROG_VALAC
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+cat > 'Makefile.am' <<'END'
+SUBDIRS = src
+END
+
+cat > 'src/Makefile.am' <<'END'
+bin_PROGRAMS = foo bar
+foo_CFLAGS = $(GOBJECT_CFLAGS)
+foo_LDADD = $(GOBJECT_LIBS)
+foo_SOURCES = baz.vala
+bar_SOURCES = baz.vala
+bar_VALAFLAGS = -D BAR
+bar_CFLAGS = $(GOBJECT_CFLAGS)
+bar_LDADD = $(GOBJECT_LIBS)
+END
+
+cat > 'src/baz.vala' <<'END'
+void main () {
+#if BAR
+  stdout.printf ("bar\n");
+#else
+  stdout.printf ("foo\n");
+#endif
+}
+END
+
+libtoolize
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+


hooks/post-receive
--
GNU Automake




reply via email to

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