2 # Copyright (C) 1996-2015 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 # Basic "grepping" test on vala support.
21 # So that we won't require libtool macros.
22 cat > acinclude.
m4 <<'END'
23 AC_DEFUN([AC_PROG_LIBTOOL],
24 [AC_SUBST([LIBTOOL], [:])])
27 cat >> 'configure.ac' << 'END'
33 AC_CONFIG_FILES
([sub
/Makefile
])
37 cat > Makefile.am
<<'END'
41 zardoz_SOURCES = zardoz.vala
42 zardoz_VALAFLAGS = --debug
44 lib_LTLIBRARIES = libzardoz.la
45 libzardoz_la_SOURCES = zardoz-foo.vala zardoz-bar.vala
50 cat > sub
/Makefile.am
<<'END'
52 foo_SOURCES = bar.vala baz.vala mu.c zap.cxx
62 grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' Makefile.
in
63 grep '\$(VALAC).* \$(zardoz_VALAFLAGS) \$(VALAFLAGS) ' Makefile.
in
64 $FGREP 'am_zardoz_OBJECTS' Makefile.
in
65 $FGREP 'am_libzardoz_la_OBJECTS' Makefile.
in
66 $FGREP 'zardoz_vala.stamp:' Makefile.
in
67 $FGREP 'libzardoz_la_vala.stamp:' Makefile.
in
68 test $
($FGREP -c '.stamp:' Makefile.
in) -eq 2
69 $FGREP 'zardoz.c' Makefile.
in
70 $FGREP 'zardoz-foo.c' Makefile.
in
71 $FGREP 'zardoz-bar.c' Makefile.
in
73 grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' sub
/Makefile.
in
74 $FGREP 'foo_VALAFLAGS' sub
/Makefile.
in && exit 1
75 $FGREP 'am_foo_OBJECTS' sub
/Makefile.
in
76 $FGREP 'bar.c' sub
/Makefile.
in
77 $FGREP 'baz.c' sub
/Makefile.
in
78 $FGREP 'foo_vala.stamp:' sub
/Makefile.
in
79 test $
($FGREP -c '.stamp:' sub
/Makefile.
in) -eq 1
81 # Check against regression for weird bug due to unescaped '@'
82 # characters used in a "..." perl string when writing the vala
83 # rules from automake.in.
84 grep '\$[0-9][0-9]*t' Makefile.
in sub
/Makefile.
in && exit 1