news: update w.r.t. recent depcomp changes
[automake.git] / t / vala-parallel.sh
blobc71420ad7719e59d48c750b67e5f17f2de8fead4
1 #! /bin/sh
2 # Copyright (C) 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)
7 # any later version.
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 # Vala support with parallel make.
19 required='valac cc GNUmake'
20 . test-init.sh
22 cat >> configure.ac <<'END'
23 AC_PROG_CC
24 AC_PROG_CXX
25 AM_PROG_VALAC([0.7.3])
26 AC_OUTPUT
27 END
29 cat > Makefile.am <<'END'
30 bin_PROGRAMS = zardoz
31 AM_VALAFLAGS = --profile=posix
32 zardoz_SOURCES = main.vala 1.vala 2.vala 3.vala 4.vala 5.vala 6.vala
33 END
35 echo 'int main () {' > main.vala
36 for i in 1 2 3 4 5 6; do
37 echo "void foo$i () { stdout.printf (\"ok $i\\n\"); }" > $i.vala
38 echo "foo$i ();" >> main.vala
39 done
40 echo 'return 0; }' >> main.vala
42 cat main.vala # For debugging.
44 $ACLOCAL
45 $AUTOMAKE -a
46 $AUTOCONF
48 ./configure
50 $MAKE -j3
51 ls -l # For debugging.
52 for x in main 1 2 3 4 5 6; do test -f $x.c; done
53 test -f zardoz_vala.stamp
55 $MAKE maintainer-clean -j4
56 ls -l # For debugging.
57 for x in main 1 2 3 4 5 6; do test ! -e $x.c; done
58 test ! -e zardoz_vala.stamp
60 mkdir build
61 cd build
62 ../configure
63 $MAKE -j6
64 ls -l . .. # For debugging.
65 for x in main 1 2 3 4 5 6; do test -f ../$x.c; done
66 test -f ../zardoz_vala.stamp
68 $MAKE distcheck -j4
70 $MAKE maintainer-clean -j2
71 for x in main 1 2 3 4 5 6; do test ! -e ../$x.c; done
72 test ! -e ../zardoz_vala.stamp