2 # Copyright (C) 2010 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 77.
18 # Keep this ins sync with the sister test silentf90.test.
20 required
='gfortran' # FIXME: any working Fortran compiler should be OK!
27 cat >>configure.
in <<'EOF'
30 AC_CONFIG_FILES([sub/Makefile])
34 cat > Makefile.am
<<'EOF'
35 # Need generic and non-generic rules.
36 bin_PROGRAMS = foo1 foo2
38 foo2_SOURCES = $(foo1_SOURCES)
39 foo2_FFLAGS = $(AM_FFLAGS)
43 cat > sub
/Makefile.am
<<'EOF'
44 AUTOMAKE_OPTIONS = subdir-objects
45 # Need generic and non-generic rules.
46 bin_PROGRAMS = bar1 bar2
48 bar2_SOURCES = $(bar1_SOURCES)
49 bar2_FFLAGS = $(AM_FFLAGS)
60 $AUTOMAKE --add-missing
63 .
/configure
--enable-silent-rules
64 $MAKE >stdout ||
{ cat stdout
; Exit
1; }
67 $EGREP ' (-c|-o)' stdout
&& Exit
1
68 grep 'mv ' stdout
&& Exit
1
70 grep 'F77 .*foo\.' stdout
71 grep 'F77 .*bar\.' stdout
72 grep 'F77LD .*foo1' stdout
73 grep 'F77LD .*bar1' stdout
74 grep 'F77LD .*foo2' stdout
75 grep 'F77LD .*bar2' stdout
77 $EGREP '(FC|FCLD) ' stdout
&& Exit
1
79 # Ensure a clean rebuild.
82 $MAKE V
=1 >stdout ||
{ cat stdout
; Exit
1; }
88 $EGREP '(F77|FC|LD) ' stdout
&& Exit
1
91 $MAKE maintainer-clean