2 # Copyright (C) 1996-2012 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 recursive make.
19 required
="pkg-config valac gcc GNUmake"
22 cat >> configure.ac
<< 'END'
24 AM_PROG_VALAC
([0.7.0])
25 PKG_CHECK_MODULES
([GOBJECT
], [gobject-2.0
>= 2.4])
29 cat > Makefile.am
<< 'END'
30 bin_PROGRAMS
= zardoz quux
32 zardoz_SOURCES
= zardoz.vala
33 quux_SOURCES
= quux.vala
34 quux.vala
: zardoz.vala
35 sed 's/Zardoz/Quux/' <zardoz.vala
>quux.vala
43 --internal-header foo2.h \
44 --internal-vapi foo3.vapi
46 AM_CFLAGS
= $
(GOBJECT_CFLAGS
)
47 LDADD
= $
(GOBJECT_LIBS
)
50 headers
='HDR.h hello.vapi foo.h foo2.h foo3.vapi'
52 cat > zardoz.vala
<< 'END'
55 public static void main
() {
56 stdout.
printf ("Zardoz!\n");
65 grep PKG_CHECK_MODULES configure
&& skip_
"pkg-config m4 macros not found"
80 for h
in $headers; do test -f $h; done
84 $MAKE maintainer-clean
85 for h
in $headers; do test ! -e $h; done