| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 | #!/bin/sh# Copyright (C) 2010-2017 Free Software Foundation, Inc.## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program.  If not, see <http://www.gnu.org/licenses/>.# Check silent-rules mode for Fortran 77.# Keep this ins sync with the sister test 'silent-f90.sh'.required=fortran77. test-init.shmkdir subcat >>configure.ac <<'EOF'AC_PROG_F77AC_CONFIG_FILES([sub/Makefile])AC_OUTPUTEOFcat > Makefile.am <<'EOF'# Need generic and non-generic rules.bin_PROGRAMS = foo1 foo2foo1_SOURCES = foo.ffoo2_SOURCES = $(foo1_SOURCES)foo2_FFLAGS = $(AM_FFLAGS)SUBDIRS = subEOFcat > sub/Makefile.am <<'EOF'AUTOMAKE_OPTIONS = subdir-objects# Need generic and non-generic rules.bin_PROGRAMS = bar1 bar2bar1_SOURCES = bar.fbar2_SOURCES = $(bar1_SOURCES)bar2_FFLAGS = $(AM_FFLAGS)EOFcat > foo.f <<'EOF'      program foo      stop      endEOFcp foo.f sub/bar.f$ACLOCAL$AUTOMAKE --add-missing$AUTOCONF./configure --enable-silent-rulesrun_make -O# Avoid spurious failures with SunStudio Fortran compilers.sed '/^NOTICE:/d' stdout > tmv -f t stdoutcat stdout$EGREP ' (-c|-o)' stdout && exit 1grep 'mv ' stdout && exit 1grep 'F77 .*foo\.'  stdoutgrep 'F77 .*bar\.'  stdoutgrep 'F77LD .*foo1' stdoutgrep 'F77LD .*bar1' stdoutgrep 'F77LD .*foo2' stdoutgrep 'F77LD .*bar2' stdout$EGREP '(FC|FCLD) ' stdout && exit 1# Ensure a clean rebuild.$MAKE cleanrun_make -O V=1grep ' -c ' stdoutgrep ' -o ' stdout$EGREP '(F77|FC|LD) ' stdout && exit 1:
 |