2 # Copyright (C) 2009 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 # Check silent-rules mode, languages other than C.
19 required
='g++ gfortran flex bison'
26 cat >>configure.
in <<'EOF'
34 AC_CONFIG_FILES([sub/Makefile])
38 cat > Makefile.am
<<'EOF'
39 # Need generic and non-generic rules.
40 bin_PROGRAMS = foo bar
41 bar_CFLAGS = $(AM_CFLAGS)
42 foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
46 BUILT_SOURCES = foo6.h
49 cat > sub
/Makefile.am
<<'EOF'
50 AUTOMAKE_OPTIONS = subdir-objects
51 # Need generic and non-generic rules.
52 bin_PROGRAMS = baz bla
53 bla_CFLAGS = $(AM_CFLAGS)
54 baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
57 BUILT_SOURCES = baz6.h
60 cat > foo1.cpp
<<'EOF'
66 cat > foo2.f90
<<'EOF'
84 void yyerror (char *s) {}
88 fubar
: 'f' 'o' 'o' 'b' 'a' 'r' EOF
{};
93 cp foo1.cpp sub
/baz1.cpp
94 cp foo2.f90 sub
/baz2.f90
100 $AUTOMAKE --add-missing
103 # configure once for fastdep, once for non-fastdep
104 for config_args
in '' am_cv_CC_dependencies_compiler_type
=gcc
106 .
/configure
$config_args --enable-silent-rules
107 $MAKE >stdout ||
{ cat stdout
; Exit
1; }
109 grep ' -c' stdout
&& Exit
1
110 grep ' -o ' stdout
&& Exit
1
111 grep mv stdout
&& Exit
1
113 grep 'CXX .*foo1\.' stdout
114 grep 'CXX .*baz1\.' stdout
115 grep 'FC .*foo2\.' stdout
116 grep 'FC .*baz2\.' stdout
117 grep 'F77 .*foo3\.' stdout
118 grep 'F77 .*baz3\.' stdout
119 grep 'LEX .*foo5\.' stdout
120 grep 'LEX .*baz5\.' stdout
121 grep ' CC .*foo5\.' stdout
122 grep ' CC .*baz5\.' stdout
123 grep 'YACC .*foo6\.' stdout
124 grep 'YACC .*baz6\.' stdout
125 grep ' CC .*foo6\.' stdout
126 grep ' CC .*baz6\.' stdout
128 grep 'CXXLD .*foo' stdout
129 grep 'CCLD .*bar' stdout
130 grep 'CXXLD .*baz' stdout
131 grep 'CCLD .*bla' stdout
134 $MAKE V
=1 >stdout ||
{ cat stdout
; Exit
1; }
139 grep 'CXX .*foo1\.' stdout
&& Exit
1
140 grep 'CXX .*baz1\.' stdout
&& Exit
1
141 grep 'FC .*foo2\.' stdout
&& Exit
1
142 grep 'FC .*baz2\.' stdout
&& Exit
1
143 grep 'F77 .*foo3\.' stdout
&& Exit
1
144 grep 'F77 .*baz3\.' stdout
&& Exit
1
145 grep 'LEX .*foo5\.' stdout
&& Exit
1
146 grep 'LEX .*baz5\.' stdout
&& Exit
1
147 grep ' CC .*foo5\.' stdout
&& Exit
1
148 grep ' CC .*baz5\.' stdout
&& Exit
1
149 grep 'YACC .*foo6\.' stdout
&& Exit
1
150 grep 'YACC .*baz6\.' stdout
&& Exit
1
151 grep ' CC .*foo6\.' stdout
&& Exit
1
152 grep ' CC .*baz6\.' stdout
&& Exit
1
154 grep 'CXXLD .*foo' stdout
&& Exit
1
155 grep 'CCLD .*bar' stdout
&& Exit
1
156 grep 'CXXLD .*baz' stdout
&& Exit
1
157 grep 'CCLD .*bla' stdout
&& Exit
1
159 $MAKE maintainer-clean