summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-10 07:44:01 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-10 07:44:01 +0200
commitae4ab510f17e57b6a4998c590df7566fb47d73a9 (patch)
tree7069ad265f42db05cf38a77f6f73a6f65ae978a2 /tests
parentda239edeee81b4794025de2d9370f733d3423a59 (diff)
downloadautomake-ae4ab510f17e57b6a4998c590df7566fb47d73a9.tar.gz
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. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/Makefile.in1
-rwxr-xr-xtests/vala.test25
-rwxr-xr-xtests/vala1.test26
-rwxr-xr-xtests/vala2.test18
-rwxr-xr-xtests/vala3.test7
-rwxr-xr-xtests/vala4.test61
7 files changed, 100 insertions, 39 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a0bee69b4..4e0de8531 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -631,6 +631,7 @@ vala.test \
vala1.test \
vala2.test \
vala3.test \
+vala4.test \
vars.test \
vars3.test \
vartar.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index c986262b8..2ae178ac4 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -783,6 +783,7 @@ vala.test \
vala1.test \
vala2.test \
vala3.test \
+vala4.test \
vars.test \
vars3.test \
vartar.test \
diff --git a/tests/vala.test b/tests/vala.test
index d709cb235..c9b12afd0 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -21,7 +22,7 @@
# Test to make sure intermediate .c files are built from vala source.
required="libtool"
-. ./defs || exit 1
+. ./defs || Exit 1
set -e
@@ -48,14 +49,14 @@ END
$ACLOCAL
$AUTOMAKE -a
-grep -w -- 'VALAC' 'Makefile.in'
-grep -w -- 'am_zardoz_OBJECTS' 'Makefile.in'
-grep -w -- 'am_libzardoz_la_OBJECTS' 'Makefile.in'
-grep -w -- 'zardoz_vala.stamp' 'Makefile.in'
-grep -w -- 'libzardoz_la_vala.stamp' 'Makefile.in'
-grep -w -- '--library=libzardoz' 'Makefile.in'
-grep -w -- 'zardoz\.c' 'Makefile.in'
-grep -w -- 'zardoz\.h' 'Makefile.in'
-grep -w -- 'zardoz-foo\.c' 'Makefile.in'
-grep -w -- 'zardoz-foo\.h' 'Makefile.in'
+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 ' --library=libzardoz' Makefile.in
+grep 'zardoz\.c' Makefile.in
+grep 'zardoz\.h' Makefile.in
+grep 'zardoz-foo\.c' Makefile.in
+grep 'zardoz-foo\.h' Makefile.in
diff --git a/tests/vala1.test b/tests/vala1.test
index 086b312ec..69edb1568 100755
--- a/tests/vala1.test
+++ b/tests/vala1.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -22,7 +23,7 @@
# in non-recursive automake mode.
required="libtool"
-. ./defs || exit 1
+. ./defs || Exit 1
set -e
@@ -48,14 +49,13 @@ END
$ACLOCAL
$AUTOMAKE -a
-grep -w -- 'VALAC' 'Makefile.in'
-grep -w -- 'src_zardoz_OBJECTS' 'Makefile.in'
-grep -w -- 'src_libzardoz_la_OBJECTS' 'Makefile.in'
-grep -w -- 'src_zardoz_vala.stamp' 'Makefile.in'
-grep -w -- 'src_libzardoz_la_vala.stamp' 'Makefile.in'
-grep -w -- '--library=libzardoz' 'Makefile.in'
-grep -w -- 'zardoz\.c' 'Makefile.in'
-grep -w -- 'zardoz\.h' 'Makefile.in'
-grep -w -- 'src/zardoz-foo\.c' 'Makefile.in'
-grep -w -- 'src/zardoz-foo\.h' 'Makefile.in'
-
+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 ' --library=libzardoz' Makefile.in
+grep 'zardoz\.c' Makefile.in
+grep 'zardoz\.h' Makefile.in
+grep 'src/zardoz-foo\.c' Makefile.in
+grep 'src/zardoz-foo\.h' Makefile.in
diff --git a/tests/vala2.test b/tests/vala2.test
index 03ce33c37..ce568d552 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008 Free Software Foundation,
+# Inc.
#
# This file is part of GNU Automake.
#
@@ -21,7 +22,7 @@
# Test to make foo_PKGNAME variables are considered.
required="libtool"
-. ./defs || exit 1
+. ./defs || Exit 1
set -e
@@ -45,10 +46,9 @@ END
$ACLOCAL
$AUTOMAKE -a
-grep -w -- 'VALAC' 'Makefile.in'
-grep -w -- 'src_libzardoz_la_OBJECTS' 'Makefile.in'
-grep -w -- 'src_libzardoz_la_vala.stamp' 'Makefile.in'
-grep -w -- '--library=zardoz+-3.0' 'Makefile.in'
-grep -w -- 'src/zardoz-foo\.c' 'Makefile.in'
-grep -w -- 'src/zardoz-foo\.h' 'Makefile.in'
-
+grep 'VALAC' Makefile.in
+grep 'src_libzardoz_la_OBJECTS' Makefile.in
+grep 'src_libzardoz_la_vala.stamp' Makefile.in
+grep ' --library=zardoz+-3.0' Makefile.in
+grep 'src/zardoz-foo\.c' Makefile.in
+grep 'src/zardoz-foo\.h' Makefile.in
diff --git a/tests/vala3.test b/tests/vala3.test
index 70aca2771..41b083d6d 100755
--- a/tests/vala3.test
+++ b/tests/vala3.test
@@ -21,7 +21,7 @@
# Test to make sure compiling Vala code really works.
required="libtool libtoolize pkg-config valac gcc"
-. ./defs || exit 1
+. ./defs || Exit 1
set -e
@@ -31,11 +31,8 @@ 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_OUTPUT
END
@@ -63,5 +60,5 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-make
+$MAKE
diff --git a/tests/vala4.test b/tests/vala4.test
new file mode 100755
index 000000000..a2e8c9649
--- /dev/null
+++ b/tests/vala4.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2008 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 AM_PROG_VALAC.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AM_PROG_VALAC([0.0.1])
+AC_OUTPUT
+END
+
+: > 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 -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"
+: