2 # Copyright (C) 2010-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 # Check silent-rules mode for Fortran 90.
18 # Keep this ins sync with the sister test silentf77.test.
25 cat >>configure.ac <<'EOF'
28 AC_CONFIG_FILES([sub/Makefile])
32 cat > Makefile.am <<'EOF'
33 # Need generic and non-generic rules.
34 bin_PROGRAMS = foo1 foo2
35 foo1_SOURCES = foo.f90
36 foo2_SOURCES = $(foo1_SOURCES)
37 foo2_FCFLAGS = $(AM_FCLAGS)
41 cat > sub/Makefile.am <<'EOF'
42 AUTOMAKE_OPTIONS = subdir-objects
43 # Need generic and non-generic rules.
44 bin_PROGRAMS = bar1 bar2
45 bar1_SOURCES = bar.f90
46 bar2_SOURCES = $(bar1_SOURCES)
47 bar2_FCFLAGS = $(AM_FCLAGS)
55 cp foo.f90 sub/bar.f90
58 $AUTOMAKE --add-missing
61 ./configure --enable-silent-rules
62 $MAKE >stdout || { cat stdout; exit 1; }
64 # Avoid spurious failures with SunStudio Fortran compilers.
65 sed '/^NOTICE:/d' stdout > t
69 $EGREP ' (-c|-o)' stdout && exit 1
70 grep 'mv ' stdout && exit 1
72 grep 'FC .*foo\.' stdout
73 grep 'FC .*bar\.' stdout
74 grep 'FCLD .*foo1' stdout
75 grep 'FCLD .*bar1' stdout
76 grep 'FCLD .*foo2' stdout
77 grep 'FCLD .*bar2' stdout
79 $EGREP '(F77|F77LD) ' stdout && exit 1
81 # Ensure a clean rebuild.
84 $MAKE V=1 >stdout || { cat stdout; exit 1; }
90 $EGREP '(F77|FC|LD) ' stdout && exit 1