2 # Copyright (C) 2002-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 # Make sure that derivations work with .lo too.
20 required='cc libtoolize yacc'
25 cat >>configure.ac <<EOF
33 cat >Makefile.am << 'END'
34 lib_LTLIBRARIES = libfoo.la
35 libfoo_la_SOURCES = foo.x_
38 ## The leading ':;' works around a bug in bash <= 3.2.
39 :; { echo '/* autogenerated */' \
41 && echo 'int yylex () {return 0;}' \
42 && echo 'void yyerror (char *s) {}' \
45 && echo "foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};" \
47 ## Account for VPATH issues on weaker make implementations.
48 && cat `test -f '$<' || echo $(srcdir)/`$<; \
53 echo $(libfoo_la_OBJECTS) | grep '^foo\.lo$$'
57 int foo (void) { return yyparse(); }
60 # We must protect the TAP driver from the output of configure, since
61 # that might output a stray "ok" on a line of its own (due to a
62 # libtool bug on Mac OS X), thus causing a spurious test result to
63 # be seen. See automake bug#11897.
66 st=0; ./configure >output 2>&1 || st=1
71 command_ok_ "libtoolize" libtoolize --force
72 command_ok_ "aclocal" $ACLOCAL
73 command_ok_ "autoconf" $AUTOCONF
74 command_ok_ "automake" $AUTOMAKE --add-missing
75 command_ok_ "configure" run_configure
76 command_ok_ "make test" $MAKE test
78 directive=''; make_can_chain_suffix_rules || directive=TODO
79 command_ok_ "make all" -D "$directive" -r "suffix rules not chained" \