Hello automakers. I'm seeing this failure with Solaris XPG4 make:
-*-*-*- $ MAKE=/usr/xpg4/bin/make sh silentyacc.test silentyacc: running bison --version bison (GNU Bison) 2.4.1 Written by Robert Corbett and Richard Stallman. Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. === Running test silentyacc.test + pwd /scratch/latta/tmp/automake-1.11/tests/silentyacc.dir + set -e + mkdir sub + cat + 1>> configure.in 0<< + cat + 1> Makefile.am 0<< + cat + 1> sub/Makefile.am 0<< + cat + 1> foo.y 0<< + cp foo.y sub/bar.y + aclocal-1.11 -Werror + automake-1.11 --foreign -Werror -Wall --add-missing configure.in:5: installing `./compile' configure.in: installing `./ylwrap' + autoconf + ./configure --enable-silent-rules checking for a BSD-compatible install... /usr/local/bin/ginstall -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /opt/sfw/bin/mkdir -p checking for gawk... gawk checking whether /usr/xpg4/bin/make sets $(MAKE)... yes checking for style of include used by /usr/xpg4/bin/make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking whether gcc and cc understand -c and -o together... yes checking for bison... bison -y configure: creating ./config.status config.status: creating Makefile config.status: creating sub/Makefile config.status: executing depfiles commands + /usr/xpg4/bin/make + 1> stdout + cat stdout Making all in sub bison -y bar.y gcc -g -O2 -c -o bar.o y.tab.c rm -f y.tab.c CCLD bar1 YACC bar.c CC bar2-bar.o CCLD bar2 `all' is updated. bison -y foo.y gcc -g -O2 -c -o foo.o y.tab.c rm -f y.tab.c CCLD foo1 YACC foo.c CC foo2-foo.o CCLD foo2 `all-am' is updated. `all' is updated. + /usr/xpg4/bin/grep -E (-c|-o) stdout gcc -g -O2 -c -o bar.o y.tab.c gcc -g -O2 -c -o foo.o y.tab.c + Exit 1 + exit_status=1 + set +e + cd /scratch/latta/tmp/automake-1.11/tests + test 0 != 0 + echo silentyacc: exit 1 silentyacc: exit 1 + exit 1 -*-*-*- A similar failure happens with heirlom make on Debian GNU/Linux. Also, the tests `silentlex.test' and `silent5.test' experience similar spurious failures with those two make implementations. Now, these failures (which are due to the fact that those versions of make do not chain implicit rules) are spurious in regard to the being-tested "silent-rules" functionality, and easily worked around by adding proper explicit dependency declarations to the generated Makefile.am. So I'd like to apply the attached patches to temporary bugfixing branches, and merge them to maint. Objections? Regards, Stefano
From 8809e18373a5afa6808ded4e091ae40d487831d2 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Wed, 17 Nov 2010 21:00:23 +0100 Subject: [PATCH] Fix spurious failure in silent5.test w.r.t. Solaris XPG4 make. * tests/silent5.test (Makefile.am): Declare some dependencies explicitly, to cater to make implementations that don't otherwise chain implicit rules. This prevents (at least) Solaris XPG4 make from incorrectly using its own builtin ".l -> .o" and ".y -> .o" rules. --- ChangeLog | 7 +++++++ tests/silent5.test | 12 ++++++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index d901dd0..04bf9fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-11-17 Stefano Lattarini <stefano.lattar...@gmail.com> + Fix spurious failure in silent5.test w.r.t. Solaris XPG4 make. + * tests/silent5.test (Makefile.am): Declare some dependencies + explicitly, to cater to make implementations that don't otherwise + chain implicit rules. This prevents (at least) Solaris XPG4 make + from incorrectly using its own builtin ".l -> .o" and ".y -> .o" + rules. + Fix spurious failures of silent5.test with Sun Fortran. * tests/silent5.test: Strip from the make output some verbose messages possibly printed by the SunStudio fortran compilers, diff --git a/tests/silent5.test b/tests/silent5.test index 79dfca2..d3e82e8 100755 --- a/tests/silent5.test +++ b/tests/silent5.test @@ -121,6 +121,12 @@ SUBDIRS = sub AM_YFLAGS = -d LDADD = $(LEXLIB) BUILT_SOURCES = foo6.h +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +foo5.$(OBJEXT): foo5.c +foo6.$(OBJEXT): foo6.c +fo2-foo5.$(OBJEXT): foo5.c +fo2-foo6.$(OBJEXT): foo6.c EOF cat > sub/Makefile.am <<'EOF' @@ -136,6 +142,12 @@ ba2_FCFLAGS = $(AM_FCFLAGS) AM_YFLAGS = -d LDADD = $(LEXLIB) BUILT_SOURCES = baz6.h +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +baz5.$(OBJEXT): baz5.c +baz6.$(OBJEXT): baz6.c +ba2-baz5.$(OBJEXT): baz5.c +ba2-baz6.$(OBJEXT): baz6.c EOF cat > foo1.cpp <<'EOF' -- 1.7.1
From be8d99f3c532d945520991260831a2dbb92a6f39 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Wed, 17 Nov 2010 20:06:24 +0100 Subject: [PATCH] Fix spurious failure in silentlex.test w.r.t. Solaris XPG4 make. * tests/silentlex.test (Makefile.am): Explicitly declare some dependencies to cater to make implementations that don't otherwise chain implicit rules. This prevents (at least) Solaris XPG4 make from incorrectly using its own builtin .l -> .o rules. --- ChangeLog | 8 ++++++++ tests/silentlex.test | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee06411..61a504d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-11-17 Stefano Lattarini <stefano.lattar...@gmail.com> + + Fix spurious failure in silentlex.test w.r.t. Solaris XPG4 make. + * tests/silentlex.test (Makefile.am): Explicitly declare some + dependencies to cater to make implementations that don't otherwise + chain implicit rules. This prevents (at least) Solaris XPG4 make + from incorrectly using its own builtin .l -> .o rules. + 2010-06-06 Stefano Lattarini <stefano.lattar...@gmail.com> New test `silentlex.test' (Automake silent-mode with Lex). diff --git a/tests/silentlex.test b/tests/silentlex.test index 78e0c7d..d02342e 100755 --- a/tests/silentlex.test +++ b/tests/silentlex.test @@ -39,6 +39,10 @@ foo2_SOURCES = $(foo1_SOURCES) foo2_CFLAGS = $(AM_CFLAGS) SUBDIRS = sub LDADD = $(LEXLIB) +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +foo.$(OBJEXT): foo.c +foo2-foo.$(OBJEXT): foo.c EOF cat > sub/Makefile.am <<'EOF' @@ -49,6 +53,10 @@ bar1_SOURCES = bar.l bar2_SOURCES = $(bar1_SOURCES) bar2_CFLAGS = $(AM_CFLAGS) LDADD = $(LEXLIB) +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +bar.$(OBJEXT): bar.c +bar2-foo.$(OBJEXT): bar.c EOF cat > foo.l <<'EOF' -- 1.7.1
From 6dbb9bd5c725ee71437bba6f5f609e492f9a71fc Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Wed, 17 Nov 2010 19:29:10 +0100 Subject: [PATCH] Fix spurious failure in silentyacc.test w.r.t. Solaris XPG4 make. * tests/silentyacc.test (Makefile.am): Explicitly declare some dependencies to cater to make implementations that don't otherwise chain implicit rules. This prevents (at least) Solaris XPG4 make from incorrectly using its own builtin .y -> .o rules. --- ChangeLog | 8 ++++++++ tests/silentyacc.test | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4c906b..c047b6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-11-17 Stefano Lattarini <stefano.lattar...@gmail.com> + + Fix spurious failure in silentyacc.test w.r.t. Solaris XPG4 make. + * tests/silentyacc.test (Makefile.am): Explicitly declare some + dependencies to cater to make implementations that don't otherwise + chain implicit rules. This prevents (at least) Solaris XPG4 make + from incorrectly using its own builtin .y -> .o rules. + 2010-06-06 Stefano Lattarini <stefano.lattar...@gmail.com> New test `silentyacc.test' (Automake silent-mode with Yacc). diff --git a/tests/silentyacc.test b/tests/silentyacc.test index ac5f061..d63b568 100755 --- a/tests/silentyacc.test +++ b/tests/silentyacc.test @@ -38,6 +38,10 @@ foo1_SOURCES = foo.y foo2_SOURCES = $(foo1_SOURCES) foo2_CFLAGS = $(AM_CPPFLAGS) SUBDIRS = sub +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +foo.$(OBJEXT): foo.c +foo2-foo.$(OBJEXT): foo.c EOF cat > sub/Makefile.am <<'EOF' @@ -47,6 +51,10 @@ bin_PROGRAMS = bar1 bar2 bar1_SOURCES = bar.y bar2_SOURCES = $(bar1_SOURCES) bar2_CFLAGS = $(AM_CPPFLAGS) +# Add explicit dependencies to help make implementations that +# don't otherwise chain implicit rules (e.g., Sun make). +bar.$(OBJEXT): bar.c +bar2-foo.$(OBJEXT): bar.c EOF cat > foo.y <<'EOF' -- 1.7.1