2 # Copyright (C) 1999-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 that suffix rules chain.
24 cat >> configure.ac << 'END'
29 cat > Makefile.am << 'END'
32 sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@
35 # This is required by "make distcheck". The useless indirection is
36 # reequired to avoid false positives by the grepping checks below.
38 CLEANFILES = $(FOO).cc
41 command_ok_ "aclocal" $ACLOCAL
42 command_ok_ "automake" $AUTOMAKE
44 # The foo.cc intermediate step is implicit, it's a mistake if
45 # Automake requires this file somewhere. Also, Automake should
46 # not require the file 'foo.c' anywhere.
47 command_ok_ "intermediate files not mentioned" \
48 not $FGREP foo.c Makefile.in
49 # However Automake must figure that foo.zoo is eventually
50 # transformed into foo.o, and use this latter file (to link foo).
51 command_ok_ "final object file figured out" \
52 $FGREP 'foo.$(OBJEXT)' Makefile.in
54 command_ok_ "autoconf" $AUTOCONF
55 command_ok_ "configure" ./configure
57 # This is deliberately valid C++, but invalid C.
66 directive=''; make_can_chain_suffix_rules || directive=TODO
68 for target in all distcheck; do
69 command_ok_ "make $target" \
70 -D "$directive" -r "suffix rules not chained" \
74 # FIXME: should we check that intermediate file 'foo.cc' has
75 # been removed? Or is this requiring too much from the make
78 # Intermediate files should not be distributed.
79 command_ok_ "make distdir" $MAKE distdir
80 command_ok_ "intermediate file not distributed" test ! -e $me-1.0/foo.cc