automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-88-gb866ca1
Date: Sun, 06 Jun 2010 10:31:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b866ca1e3da0e478675de31b9be15249f3c87809

The branch, branch-1.11 has been updated
       via  b866ca1e3da0e478675de31b9be15249f3c87809 (commit)
       via  f3f323e0a4db689de7b65c62f537e1703a820d05 (commit)
       via  394f51778d21e9b156f140c95945a16490e1c38b (commit)
       via  de09b369b135b971bffb0efe383716237b9bf7f1 (commit)
       via  04b61efc536dd288d87fe6fb350c2a3a6fa860cc (commit)
       via  164a1b1813e9dd47dfeabd4bc39ed1d912ab79a0 (commit)
       via  3378c258536ab5e4c4dc2d31f89727ae59b74c8b (commit)
       via  2514b9feef865dde398d715a1d097ff5c5fcdf22 (commit)
       via  97cab581c9510e62e62683adeeda1d15a7f5fdee (commit)
       via  9afaf90073a554148e834b72fa40ade59029740b (commit)
      from  80304bf59f6c362786d57fc40f254d2489f22a4f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b866ca1e3da0e478675de31b9be15249f3c87809
Merge: 80304bf59f6c362786d57fc40f254d2489f22a4f 
f3f323e0a4db689de7b65c62f537e1703a820d05
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Jun 6 12:14:42 2010 +0200

    Merge branch 'maint' into branch-1.11

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                             |   51 ++++++++++++
 tests/Makefile.am                     |    5 +
 tests/Makefile.in                     |    5 +
 tests/silent.test                     |   16 +---
 tests/silent2.test                    |   16 +---
 tests/silent3.test                    |   19 ++---
 tests/silent4.test                    |   15 +---
 tests/silent5.test                    |  142 +++++++++++++++++++++-----------
 tests/silent6.test                    |    6 +-
 tests/silent7.test                    |   15 ++--
 tests/silent9.test                    |   15 +---
 tests/silentcxx.test                  |  105 ++++++++++++++++++++++++
 tests/{silent.test => silentf77.test} |   81 +++++++++---------
 tests/{silent.test => silentf90.test} |   81 +++++++++---------
 tests/silentlex.test                  |  142 ++++++++++++++++++++++++++++++++
 tests/silentyacc.test                 |  144 +++++++++++++++++++++++++++++++++
 16 files changed, 658 insertions(+), 200 deletions(-)
 create mode 100755 tests/silentcxx.test
 copy tests/{silent.test => silentf77.test} (53%)
 copy tests/{silent.test => silentf90.test} (53%)
 create mode 100755 tests/silentlex.test
 create mode 100755 tests/silentyacc.test

diff --git a/ChangeLog b/ChangeLog
index 00263c7..a33e763 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2010-06-06  Stefano Lattarini  <address@hidden>
+
+       Make tests on user extensibility of silent-rules mode stricter.
+       * tests/silent6.test: Made stricter w.r.t. the grepping of the
+       output produced by `make'.
+       * tests/silent7.test: Likewise.
+
+       Tests on silent-mode for C/Libtool made stricter.
+       * tests/silent.test: Made stricter w.r.t. the grepping of the
+       output produced by `make'.
+       * tests/silent2.test: Likewise.
+       * tests/silent4.test: Likewise.
+       * tests/silent9.test: Likewise.
+       * tests/silent3.test: Likewise, and add a final `make distclean'
+       command to keep it better in sync with tests/silent{4,9}.test.
+
+       Improved test silent5.test.
+       * tests/silent5.test: Remove by hand all generated C files after
+       non-verbose builds, to ensure the following builds are clean.
+       Try to clean and rebuild with the same verbosity and without
+       removing generated sources in between, to check that this does
+       not trigger a different set of rules.  Make grepping of make's
+       output stricter.  Improved/added some comments.
+
+       New tests for Automake silent-mode with Fortran.
+       * tests/silentf77.test: New test.
+       * tests/silentf90.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated accordingly.
+
+       New test `silentcxx.test' (Automake silent-mode with C++).
+       * tests/silentcxx.test: New test.
+       * tests/Makefile.am (TESTS): Updated accordingly.
+
+       New test `silentyacc.test' (Automake silent-mode with Yacc).
+       * tests/silentyacc.test: New test.
+       * tests/Makefile.am (TESTS): Updated accordingly.
+
+       New test `silentlex.test' (Automake silent-mode with Lex).
+       * tests/silentlex.test: New test.
+       * tests/Makefile.am (TESTS): Updated accordingly.
+
+       Relax tests on silent-rules to cater to overly verbose makes.
+       * tests/silent.test: When testing silent builds, don't fail if
+       make's output simply contains the `mv' substring, but only if
+       it contains the `mv ' substring (note the trailing space).
+       * tests/silent2.test: Likewise.
+       * tests/silent3.test: Likewise.
+       * tests/silent4.test: Likewise.
+       * tests/silent5.test: Likewise.
+       * tests/silent9.test: Likewise.
+
 2010-05-23  Stefano Lattarini  <address@hidden>
 
        Extend test on `nostdinc' automake option.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bde4102..3a0a776 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -610,6 +610,11 @@ silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
+silentcxx.test \
+silentf77.test \
+silentf90.test \
+silentlex.test \
+silentyacc.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7d7dfac..a5b5fc5 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -848,6 +848,11 @@ silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
+silentcxx.test \
+silentf77.test \
+silentf90.test \
+silentlex.test \
+silentyacc.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
diff --git a/tests/silent.test b/tests/silent.test
index 70fcaae..c91115c 100755
--- a/tests/silent.test
+++ b/tests/silent.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -63,9 +63,8 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
-grep mv stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
 grep 'CC    .*foo\.' stdout
 grep 'CC .*bar\.' stdout
 grep 'CC .*baz\.' stdout
@@ -80,13 +79,6 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && Exit 1
 
 :
diff --git a/tests/silent2.test b/tests/silent2.test
index e0b0935..da22718 100755
--- a/tests/silent2.test
+++ b/tests/silent2.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -65,9 +65,8 @@ $AUTOCONF
 ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
-grep mv stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
 grep 'CC .*foo\.' stdout
 grep 'CC .*bar\.' stdout
 grep 'CC .*baz\.' stdout
@@ -82,13 +81,6 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && Exit 1
 
 :
diff --git a/tests/silent3.test b/tests/silent3.test
index f83d914..d0a0131 100755
--- a/tests/silent3.test
+++ b/tests/silent3.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -66,9 +66,8 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
-grep mv stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
 grep ' CC .*baz\.' stdout
@@ -83,13 +82,9 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+
+$MAKE distclean
 
 :
diff --git a/tests/silent4.test b/tests/silent4.test
index 3fd9f65..c6c1298 100755
--- a/tests/silent4.test
+++ b/tests/silent4.test
@@ -67,9 +67,8 @@ $AUTOCONF
 ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
-grep mv stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
 grep ' CC .*baz\.' stdout
@@ -84,14 +83,8 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
 $MAKE distclean
 
diff --git a/tests/silent5.test b/tests/silent5.test
index 1f06cf0..e1134e8 100755
--- a/tests/silent5.test
+++ b/tests/silent5.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -15,12 +15,81 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode, languages other than C.
+# This test partly overlaps with other silent*.test, but it serves as
+# a stress test by using many different languages at once -- so don't
+# remove this test script.
 
+# FIXME: generic C++/Fortran compilers should suffice here
 required='g++ gfortran flex bison'
 . ./defs
 
 set -e
 
+# Avoids too much code duplication.
+do_and_check_silent_build ()
+{
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'CXX .*foo1\.' stdout
+  grep 'CXX .*baz1\.' stdout
+  grep 'FC .*foo2\.'  stdout
+  grep 'FC .*baz2\.'  stdout
+  grep 'F77 .*foo3\.' stdout
+  grep 'F77 .*baz3\.' stdout
+  grep ' CC .*foo5\.' stdout
+  grep ' CC .*baz5\.' stdout
+  grep ' CC .*foo6\.' stdout
+  grep ' CC .*baz6\.' stdout
+
+  grep 'CXXLD .*foo' stdout
+  grep 'CCLD .*bar'  stdout
+  grep 'CXXLD .*baz' stdout
+  grep 'CCLD .*bla'  stdout
+
+  if $rebuild; then :; else
+    grep 'YACC .*foo6\.' stdout
+    grep 'YACC .*baz6\.' stdout
+    grep 'LEX .*foo5\.'  stdout
+    grep 'LEX .*baz5\.'  stdout
+  fi
+
+  unset rebuild
+}
+
+# Avoids too much code duplication.
+do_and_check_verbose_build ()
+{
+
+  case $1 in
+    --rebuild) rebuild=true;;
+            *) rebuild=false;;
+  esac
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  grep '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+
+  if $rebuild; then :; else
+    grep 'ylwrap ' stdout
+    grep '(LEX|YACC) ' stdout && Exit 1
+  fi
+
+  unset rebuild
+}
+
 mkdir sub
 
 cat >>configure.in <<'EOF'
@@ -109,63 +178,38 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 # configure once for fastdep, once for non-fastdep, once for nodep
-for config_args in '' am_cv_CC_dependencies_compiler_type=gcc \
+for config_args in \
+  '' \
+  am_cv_CC_dependencies_compiler_type=gcc \
   --disable-dependency-tracking
 do
-  ./configure $config_args --enable-silent-rules
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-  grep ' -c' stdout && Exit 1
-  grep ' -o ' stdout && Exit 1
-  grep mv stdout && Exit 1
 
-  grep 'CXX .*foo1\.' stdout
-  grep 'CXX .*baz1\.' stdout
-  grep 'FC .*foo2\.' stdout
-  grep 'FC .*baz2\.' stdout
-  grep 'F77 .*foo3\.' stdout
-  grep 'F77 .*baz3\.' stdout
-  grep 'LEX .*foo5\.' stdout
-  grep 'LEX .*baz5\.' stdout
-  grep ' CC .*foo5\.' stdout
-  grep ' CC .*baz5\.' stdout
-  grep 'YACC .*foo6\.' stdout
-  grep 'YACC .*baz6\.' stdout
-  grep ' CC .*foo6\.' stdout
-  grep ' CC .*baz6\.' stdout
+  ./configure $config_args --enable-silent-rules
 
-  grep 'CXXLD .*foo' stdout
-  grep 'CCLD .*bar' stdout
-  grep 'CXXLD .*baz' stdout
-  grep 'CCLD .*bla' stdout
+  do_and_check_silent_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_silent_build --rebuild
 
+  # Ensure a clean rebuild.
   $MAKE clean
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-  grep ' -c' stdout
-  grep ' -o ' stdout
+  # This is required, since these files are not removed by `make clean'
+  # (as dictated by the GNU Coding Standards).
+  rm -f foo5.c foo6.[ch] sub/baz5.c sub/baz6.[ch]
+
+  do_and_check_verbose_build
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+  do_and_check_verbose_build --rebuild
 
-  grep 'CXX .*foo1\.' stdout && Exit 1
-  grep 'CXX .*baz1\.' stdout && Exit 1
-  grep 'FC .*foo2\.' stdout && Exit 1
-  grep 'FC .*baz2\.' stdout && Exit 1
-  grep 'F77 .*foo3\.' stdout && Exit 1
-  grep 'F77 .*baz3\.' stdout && Exit 1
-  grep 'LEX .*foo5\.' stdout && Exit 1
-  grep 'LEX .*baz5\.' stdout && Exit 1
-  grep ' CC .*foo5\.' stdout && Exit 1
-  grep ' CC .*baz5\.' stdout && Exit 1
-  grep 'YACC .*foo6\.' stdout && Exit 1
-  grep 'YACC .*baz6\.' stdout && Exit 1
-  grep ' CC .*foo6\.' stdout && Exit 1
-  grep ' CC .*baz6\.' stdout && Exit 1
-
-  grep 'CXXLD .*foo' stdout && Exit 1
-  grep 'CCLD .*bar' stdout && Exit 1
-  grep 'CXXLD .*baz' stdout && Exit 1
-  grep 'CCLD .*bla' stdout && Exit 1
+  # Ensure a clean reconfiguration/rebuild.
   $MAKE clean
   $MAKE maintainer-clean
+
 done
 
 :
diff --git a/tests/silent6.test b/tests/silent6.test
index e6f08dd..2afe6bc 100755
--- a/tests/silent6.test
+++ b/tests/silent6.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -53,7 +53,7 @@ grep 'cp ' stdout && Exit 1
 $MAKE clean
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN foo' stdout && Exit 1
+grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 
 $MAKE distclean
@@ -61,7 +61,7 @@ $MAKE distclean
 ./configure --disable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN foo' stdout && Exit 1
+grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 
 $MAKE distclean
diff --git a/tests/silent7.test b/tests/silent7.test
index e953605..cd8e1b5 100755
--- a/tests/silent7.test
+++ b/tests/silent7.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
@@ -46,45 +46,44 @@ $AUTOCONF
 ./configure --disable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout && Exit 1
+grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout && Exit 1
+grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
 $MAKE V=0 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout
+grep 'GEN .*foo' stdout
 grep 'cp ' stdout && Exit 1
 grep 'echo ' stdout && Exit 1
 
-
 $MAKE distclean
 
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout
+grep 'GEN .*foo' stdout
 grep 'cp ' stdout && Exit 1
 grep 'echo ' stdout && Exit 1
 
 $MAKE clean
 $MAKE V=0 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout
+grep 'GEN .*foo' stdout
 grep 'cp ' stdout && Exit 1
 grep 'echo ' stdout && Exit 1
 
 $MAKE clean
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'GEN.*foo' stdout && Exit 1
+grep 'GEN ' stdout && Exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
diff --git a/tests/silent9.test b/tests/silent9.test
index 6be0f98..11375f8 100755
--- a/tests/silent9.test
+++ b/tests/silent9.test
@@ -66,9 +66,8 @@ $AUTOCONF
 ./configure --disable-dependency-tracking --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o libfoo' stdout && Exit 1
-grep mv stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
 grep ' CC .*foo\.' stdout
 grep ' CC .*bar\.' stdout
 grep ' CC .*baz\.' stdout
@@ -83,14 +82,8 @@ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep ' -c' stdout
 grep ' -o libfoo' stdout
-grep ' CC .*foo\.' stdout && Exit 1
-grep ' CC .*bar\.' stdout && Exit 1
-grep ' CC .*baz\.' stdout && Exit 1
-grep ' CC .*bla\.' stdout && Exit 1
-grep ' CCLD .*foo' stdout && Exit 1
-grep ' CCLD .*bar' stdout && Exit 1
-grep ' CCLD .*baz' stdout && Exit 1
-grep ' CCLD .*bla' stdout && Exit 1
+# The libtool command line can contain e.g. a `--tag=CC' option.
+sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
 
 $MAKE distclean
 
diff --git a/tests/silentcxx.test b/tests/silentcxx.test
new file mode 100755
index 0000000..aa64d8f
--- /dev/null
+++ b/tests/silentcxx.test
@@ -0,0 +1,105 @@
+#!/bin/sh
+# Copyright (C) 2010 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 C++.
+
+required='g++' # FIXME: any decent C++ compiler should be OK
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AC_PROG_CXX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.cpp baz.cxx quux.cc
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CXXFLAGS = $(AM_CXXFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.cpp
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CXXFLAGS = $(AM_CXXFLAGS)
+EOF
+
+cat > foo.cpp <<'EOF'
+using namespace std; /* C compilers fail on this */
+int main() { return 0; }
+EOF
+
+# let's try out other extensions too
+echo 'class Baz  { public: int i;  };' > baz.cxx
+echo 'class Quux { public: bool b; };' > quux.cc
+
+cp foo.cpp sub/bar.cpp
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# configure once for fastdep, once for non-fastdep, once for nodep
+for config_args in \
+  '' \
+  am_cv_CC_dependencies_compiler_type=gcc \
+  --disable-dependency-tracking
+do
+  ./configure $config_args --enable-silent-rules
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  grep 'mv ' stdout && Exit 1
+
+  grep 'CXX .*foo\.'  stdout
+  grep 'CXX .*baz\.'  stdout
+  grep 'CXX .*quux\.' stdout
+  grep 'CXX .*bar\.'  stdout
+  grep 'CXXLD .*foo1' stdout
+  grep 'CXXLD .*bar1' stdout
+  grep 'CXXLD .*foo2' stdout
+  grep 'CXXLD .*bar2' stdout
+
+  # Ensure a clean rebuild.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(CC|CXX|LD) ' stdout && Exit 1
+
+  # Ensure a clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+
+done
+
+:
diff --git a/tests/silent.test b/tests/silentf77.test
similarity index 53%
copy from tests/silent.test
copy to tests/silentf77.test
index 70fcaae..39495d4 100755
--- a/tests/silent.test
+++ b/tests/silentf77.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2010 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
@@ -14,10 +14,10 @@
 # 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, without libtool, standard depmode case.
-
-# Please keep this file in sync with silent2.test.
+# Check silent-rules mode for Fortran 77.
+# Keep this ins sync with the sister test silentf90.test.
 
+required='gfortran' # FIXME: any working Fortran compiler should be OK!
 . ./defs
 
 set -e
@@ -26,35 +26,35 @@ mkdir sub
 
 cat >>configure.in <<'EOF'
 AM_SILENT_RULES
+AC_PROG_F77
 AC_CONFIG_FILES([sub/Makefile])
-AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
 cat > Makefile.am <<'EOF'
 # Need generic and non-generic rules.
-bin_PROGRAMS = foo bar
-bar_CFLAGS = $(AM_CFLAGS)
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.f
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_FFLAGS = $(AM_FFLAGS)
 SUBDIRS = sub
 EOF
 
 cat > sub/Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
 # Need generic and non-generic rules.
-bin_PROGRAMS = baz bla
-bla_CFLAGS = $(AM_CFLAGS)
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.f
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_FFLAGS = $(AM_FFLAGS)
 EOF
 
-cat > foo.c <<'EOF'
-int main ()
-{
-  return 0;
-}
+cat > foo.f <<'EOF'
+      program foo
+      stop
+      end
 EOF
-cp foo.c bar.c
-cp foo.c sub/baz.c
-cp foo.c sub/bla.c
+cp foo.f sub/bar.f
 
 $ACLOCAL
 $AUTOMAKE --add-missing
@@ -63,30 +63,29 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
-grep mv stdout && Exit 1
-grep 'CC    .*foo\.' stdout
-grep 'CC .*bar\.' stdout
-grep 'CC .*baz\.' stdout
-grep 'CC .*bla\.' stdout
-grep 'CCLD .*foo' stdout
-grep 'CCLD .*bar' stdout
-grep 'CCLD .*baz' stdout
-grep 'CCLD .*bla' stdout
 
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
+
+grep 'F77 .*foo\.'  stdout
+grep 'F77 .*bar\.'  stdout
+grep 'F77LD .*foo1' stdout
+grep 'F77LD .*bar1' stdout
+grep 'F77LD .*foo2' stdout
+grep 'F77LD .*bar2' stdout
+
+$EGREP '(FC|FCLD) ' stdout && Exit 1
+
+# Ensure a clean rebuild.
 $MAKE clean
+
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout
-grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
-
-:
+
+grep ' -c ' stdout
+grep ' -o ' stdout
+
+$EGREP '(F77|FC|LD) ' stdout && Exit 1
+
+$MAKE clean
+$MAKE maintainer-clean
diff --git a/tests/silent.test b/tests/silentf90.test
similarity index 53%
copy from tests/silent.test
copy to tests/silentf90.test
index 70fcaae..9330bdd 100755
--- a/tests/silent.test
+++ b/tests/silentf90.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2010 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
@@ -14,10 +14,10 @@
 # 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, without libtool, standard depmode case.
-
-# Please keep this file in sync with silent2.test.
+# Check silent-rules mode for Fortran 90.
+# Keep this ins sync with the sister test silentf77.test.
 
+required='gfortran' # FIXME: any working Fortran compiler should be OK!
 . ./defs
 
 set -e
@@ -26,35 +26,35 @@ mkdir sub
 
 cat >>configure.in <<'EOF'
 AM_SILENT_RULES
+AC_PROG_FC
 AC_CONFIG_FILES([sub/Makefile])
-AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
 cat > Makefile.am <<'EOF'
 # Need generic and non-generic rules.
-bin_PROGRAMS = foo bar
-bar_CFLAGS = $(AM_CFLAGS)
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.f90
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_FCFLAGS = $(AM_FCLAGS)
 SUBDIRS = sub
 EOF
 
 cat > sub/Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
 # Need generic and non-generic rules.
-bin_PROGRAMS = baz bla
-bla_CFLAGS = $(AM_CFLAGS)
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.f90
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_FCFLAGS = $(AM_FCLAGS)
 EOF
 
-cat > foo.c <<'EOF'
-int main ()
-{
-  return 0;
-}
+cat > foo.f90 <<'EOF'
+      program foo
+      stop
+      end
 EOF
-cp foo.c bar.c
-cp foo.c sub/baz.c
-cp foo.c sub/bla.c
+cp foo.f90 sub/bar.f90
 
 $ACLOCAL
 $AUTOMAKE --add-missing
@@ -63,30 +63,29 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout && Exit 1
-grep ' -o foo' stdout && Exit 1
-grep mv stdout && Exit 1
-grep 'CC    .*foo\.' stdout
-grep 'CC .*bar\.' stdout
-grep 'CC .*baz\.' stdout
-grep 'CC .*bla\.' stdout
-grep 'CCLD .*foo' stdout
-grep 'CCLD .*bar' stdout
-grep 'CCLD .*baz' stdout
-grep 'CCLD .*bla' stdout
 
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
+
+grep 'FC .*foo\.'  stdout
+grep 'FC .*bar\.'  stdout
+grep 'FCLD .*foo1' stdout
+grep 'FCLD .*bar1' stdout
+grep 'FCLD .*foo2' stdout
+grep 'FCLD .*bar2' stdout
+
+$EGREP '(F77|F77LD) ' stdout && Exit 1
+
+# Ensure a clean rebuild.
 $MAKE clean
+
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep ' -c' stdout
-grep ' -o foo' stdout
-grep 'CC .*foo\.' stdout && Exit 1
-grep 'CC .*bar\.' stdout && Exit 1
-grep 'CC .*baz\.' stdout && Exit 1
-grep 'CC .*bla\.' stdout && Exit 1
-grep 'CCLD .*foo' stdout && Exit 1
-grep 'CCLD .*bar' stdout && Exit 1
-grep 'CCLD .*baz' stdout && Exit 1
-grep 'CCLD .*bla' stdout && Exit 1
-
-:
+
+grep ' -c ' stdout
+grep ' -o ' stdout
+
+$EGREP '(F77|FC|LD) ' stdout && Exit 1
+
+$MAKE clean
+$MAKE maintainer-clean
diff --git a/tests/silentlex.test b/tests/silentlex.test
new file mode 100755
index 0000000..78e0c7d
--- /dev/null
+++ b/tests/silentlex.test
@@ -0,0 +1,142 @@
+#!/bin/sh
+# Copyright (C) 2010 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 Lex.
+
+required='flex'
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# configure once for fastdep, once for non-fastdep, once for nodep
+for config_args in \
+  '' \
+  am_cv_CC_dependencies_compiler_type=gcc \
+  --disable-dependency-tracking
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'LEX .*foo\.' stdout
+  grep 'LEX .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for LEX, as probably lex hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.c sub/bar.c
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.c sub/bar.c
+
+done
+
+:
diff --git a/tests/silentyacc.test b/tests/silentyacc.test
new file mode 100755
index 0000000..ac5f061
--- /dev/null
+++ b/tests/silentyacc.test
@@ -0,0 +1,144 @@
+#!/bin/sh
+# Copyright (C) 2010 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 Yacc.
+
+required='bison'
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CPPFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) {}
+int yylex (void) {return 0;}
+int main(void) {return 0;}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# configure once for fastdep, once for non-fastdep, once for nodep
+for config_args in \
+  '' \
+  am_cv_CC_dependencies_compiler_type=gcc \
+  --disable-dependency-tracking
+do
+  ./configure $config_args --enable-silent-rules
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'YACC .*foo\.' stdout
+  grep 'YACC .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for YACC, as probably yacc hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  # Don't look for ylwrap, as probably lex hasn't been re-run.
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+
+  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+done
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]