2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test to make sure compiling Vala code really works with non-recursive make.
19 required="pkg-config valac gcc GNUmake"
24 cat >> 'configure.ac' << 'END'
26 AM_PROG_VALAC([0.7.0])
27 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
31 cat > 'src/zardoz.vala' <<'END'
35 public static void main () {
36 stdout.printf ("Zardoz!\n");
41 cat > 'Makefile.am' <<'END'
42 AUTOMAKE_OPTIONS = subdir-objects
43 bin_PROGRAMS = src/zardoz
44 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
45 src_zardoz_LDADD = $(GOBJECT_LIBS)
46 src_zardoz_SOURCES = src/zardoz.vala
56 test -f src_zardoz_vala.stamp
58 $MAKE maintainer-clean
59 test ! -e src/zardoz.c
60 test ! -e src_zardoz_vala.stamp
71 # Try again with subdir-objects.
73 cat > 'Makefile.am' <<'END'
74 AUTOMAKE_OPTIONS = subdir-objects
76 bin_PROGRAMS = src/zardoz
77 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
78 src_zardoz_LDADD = $(GOBJECT_LIBS)
79 src_zardoz_SOURCES = src/zardoz.vala
86 ./configure || skip_ "configure failure"