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 3, 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, with libtool, standard depmode case.
19 # Please keep this file in sync with silent4.test.
28 cat >>configure.in <<'EOF'
30 AC_CONFIG_FILES([sub/Makefile])
37 cat > Makefile.am <<'EOF'
38 # Need generic and non-generic rules.
39 lib_LTLIBRARIES = libfoo.la libbar.la
40 libbar_la_CFLAGS = $(AM_CFLAGS)
44 cat > sub/Makefile.am <<'EOF'
45 AUTOMAKE_OPTIONS = subdir-objects
46 # Need generic and non-generic rules.
47 lib_LTLIBRARIES = libbaz.la libbla.la
48 libbla_la_CFLAGS = $(AM_CFLAGS)
51 cat > libfoo.c <<'EOF'
58 cp libfoo.c sub/libbaz.c
59 cp libfoo.c sub/libbla.c
63 $AUTOMAKE --add-missing
66 ./configure --enable-silent-rules
67 $MAKE >stdout || { cat stdout; Exit 1; }
69 grep ' -c' stdout && Exit 1
70 grep ' -o libfoo' stdout && Exit 1
71 grep mv stdout && Exit 1
72 grep ' CC .*foo\.' stdout
73 grep ' CC .*bar\.' stdout
74 grep ' CC .*baz\.' stdout
75 grep ' CC .*bla\.' stdout
76 grep ' CCLD .*foo' stdout
77 grep ' CCLD .*bar' stdout
78 grep ' CCLD .*baz' stdout
79 grep ' CCLD .*bla' stdout
82 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
85 grep ' -o libfoo' stdout
86 grep ' CC .*foo\.' stdout && Exit 1
87 grep ' CC .*bar\.' stdout && Exit 1
88 grep ' CC .*baz\.' stdout && Exit 1
89 grep ' CC .*bla\.' stdout && Exit 1
90 grep ' CCLD .*foo' stdout && Exit 1
91 grep ' CCLD .*bar' stdout && Exit 1
92 grep ' CCLD .*baz' stdout && Exit 1
93 grep ' CCLD .*bla' stdout && Exit 1