automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, silent-fixes, updated. v1.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, silent-fixes, updated. v1.11-599-g0eaa878
Date: Mon, 26 Dec 2011 21:33:05 +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=0eaa8781bf043b34aaae0309f17aeb7943dbe4c7

The branch, silent-fixes has been updated
       via  0eaa8781bf043b34aaae0309f17aeb7943dbe4c7 (commit)
      from  8493499b54da3694f820fa7eab5e58ef44448b66 (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 0eaa8781bf043b34aaae0309f17aeb7943dbe4c7
Author: Stefano Lattarini <address@hidden>
Date:   Mon Dec 26 18:23:24 2011 +0100

    tests: tweak tests on silent-rules for makes without nested vars
    
    * tests/silent-nested-vars.test: Define $MAKE to `./mymake' in
    the environment, so that it will be automatically picked up by
    configure.  Related tweaks and simplifications.
    Remove the checks verifying that silent rules are respected also
    when the 'subdir-objects' option is set, the checks testing the
    old syntax for user-defined silent rules, and the tests using
    the default $MAKE programs: they are redundant w.r.t. other test
    cases.  Related simplifications.
    Remove the temporary files used in a sanity check as soon as they
    are not needed anymore.
    Do not capture also the standard error of configure: we only want
    to grep its standard output.
    Consistently use `stdout' for the name of files where to save the
    standard output captured from make and configure, for consistency
    with other tests.
    Make grepping of configure output and of the generated Makefile
    stricter.
    Improve and tweak the `mymake' script a little.
    * tests/silent6.test: Make grepping of make stdout slightly
    stricter.  After having configured with silent rules disabled,
    try to force the use silent rules with `make V=1'.

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

Summary of changes:
 ChangeLog                     |   25 ++++++++
 tests/silent-nested-vars.test |  128 +++++++++++++---------------------------
 tests/silent6.test            |   14 +++-
 3 files changed, 77 insertions(+), 90 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7d6a44a..03ba90d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2011-12-26  Stefano Lattarini  <address@hidden>
+
+       tests: tweak tests on silent-rules for makes without nested vars
+       * tests/silent-nested-vars.test: Define $MAKE to `./mymake' in
+       the environment, so that it will be automatically picked up by
+       configure.  Related tweaks and simplifications.
+       Remove the checks verifying that silent rules are respected also
+       when the 'subdir-objects' option is set, the checks testing the
+       old syntax for user-defined silent rules, and the tests using
+       the default $MAKE programs: they are redundant w.r.t. other test
+       cases.  Related simplifications.
+       Remove the temporary files used in a sanity check as soon as they
+       are not needed anymore.
+       Do not capture also the standard error of configure: we only want
+       to grep its standard output.
+       Consistently use `stdout' for the name of files where to save the
+       standard output captured from make and configure, for consistency
+       with other tests.
+       Make grepping of configure output and of the generated Makefile
+       stricter.
+       Improve and tweak the `mymake' script a little.
+       * tests/silent6.test: Make grepping of make stdout slightly
+       stricter.  Also try to force the use silent rules with `V=1'
+       after having configured with silent rules disabled.
+
 2011-12-25  Paul Eggert  <address@hidden>
 
        silent-rules: fallback for makes without nested vars
diff --git a/tests/silent-nested-vars.test b/tests/silent-nested-vars.test
index 4b0fa3c..0024b5d 100755
--- a/tests/silent-nested-vars.test
+++ b/tests/silent-nested-vars.test
@@ -21,13 +21,8 @@
 
 set -e
 
-mkdir sub
-
 cat >>configure.in <<'EOF'
 AM_SILENT_RULES
-AM_CONDITIONAL([HAVE_NESTED_VARIABLES],
-  [expr "x$AM_V" : '.*\$' >/dev/null])
-AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_OUTPUT
@@ -37,7 +32,6 @@ cat > Makefile.am <<'EOF'
 # Need generic and non-generic rules.
 bin_PROGRAMS = foo bar
 bar_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
 
 # Check that AM_V and AM_DEFAULT_V work as advertised.
 pkg_verbose = $(address@hidden@)
@@ -50,24 +44,6 @@ oop:
 
 mostlyclean-local:
        rm -f oop
-
-if HAVE_NESTED_VARIABLES
-# Check that the older form (documented in Automake 1.11) works.
-older_pkg_verbose = $(older_pkg_verbose_$(V))
-older_pkg_verbose_ = $(older_pkg_verbose_$(AM_DEFAULT_VERBOSITY))
-older_pkg_verbose_0 = @echo OLDER-PKG-GEN $@;
-
-bin_SCRIPTS += older-oop
-older-oop:
-       $(older_pkg_verbose)echo $@ >$@
-endif
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = baz bla
-bla_CFLAGS = $(AM_CFLAGS)
 EOF
 
 cat > foo.c <<'EOF'
@@ -77,14 +53,10 @@ int main ()
 }
 EOF
 cp foo.c bar.c
-cp foo.c sub/baz.c
-cp foo.c sub/bla.c
 
 cat >mymake <<'EOF'
 #! /bin/sh
 makerules=
-LC_ALL=C
-export LC_ALL
 
 case $1 in
   -f)
@@ -98,8 +70,8 @@ case $1 in
     done ;;
 esac
 
+nested_var_pat='^[^#].*\$([^)]*\$'
 if
-  nested_var_pat='^[^#]*\$([a-zA-Z0-9_]*\$'
   case $makefile in
     -) printf '%s\n' "$makerules" | grep "$nested_var_pat";;
     *) grep "$nested_var_pat" $makefile;;
@@ -116,7 +88,8 @@ esac
 EOF
 chmod a+x mymake
 mymake_MAKE=${MAKE-make}
-export mymake_MAKE
+MAKE=./mymake
+export MAKE mymake_MAKE
 
 # As a sanity check, verify that `mymake' rejects Makefiles that
 # use nested variables.
@@ -125,69 +98,52 @@ a = $(b$(c))
 all:
        touch bar
 END
-./mymake && Exit 99
+$MAKE && Exit 99
 mv -f Makefile foo.mk
-./mymake -f foo.mk && Exit 99
-cat foo.mk | ./mymake -f - && Exit 99
+$MAKE -f foo.mk && Exit 99
+cat foo.mk | $MAKE -f - && Exit 99
 test -f bar && Exit 99
 sed '/a =/d' foo.mk > Makefile
-./mymake && test -f bar || Exit 99
+$MAKE && test -f bar || Exit 99
+rm -f bar Makefile foo.mk
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-for make in ${MAKE-make} ./mymake; do
-  ./configure --enable-silent-rules MAKE=$make >enable.out 2>&1 ||
-    { cat enable.out; Exit 1; }
-  cat enable.out
-  case $make in
-    ./mymake)
-      grep 'AM_V_CC = .*0' Makefile
-      grep 'checking whether ./mymake supports nested variables... no' \
-        enable.out
-      ;;
-  esac
-
-  $make >stdout || { cat stdout; Exit 1; }
-  cat stdout
-  $EGREP ' (-c|-o)' 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
-  grep 'PKG-GEN .*oop' stdout
-  if test $am_cv_make_support_nested_variables = yes; then
-    grep 'OLDER-PKG-GEN .*older-oop' stdout
-  fi
-  $make clean
-
-  ./configure --disable-silent-rules MAKE=$make >disable.out 2>&1 ||
-    { cat disable.out; Exit 1; }
-  cat disable.out
-  case $make in
-    ./mymake)
-      grep 'AM_V_CC = .*1' Makefile
-      grep 'checking whether ./mymake supports nested variables... no' \
-        disable.out
-      ;;
-  esac
-
-  $make >stdout || { cat stdout; Exit 1; }
-  cat stdout
-  grep ' -c' stdout
-  grep ' -o foo' stdout
-  grep 'echo .*oop' stdout
-  if test $am_cv_make_support_nested_variables = yes; then
-    grep 'echo .*older-oop' stdout
-  fi
-  $EGREP '(CC|LD) ' stdout && Exit 1
-  $make clean
-done
+./configure --enable-silent-rules >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
+  stdout
+$EGREP 'CC|AM_V|GEN' Makefile # For debugging.
+grep '^AM_V_CC =  *\$(am__v_CC_0) *$' Makefile
+grep '^AM_V_GEN =  *\$(am__v_GEN_0) *$' Makefile
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP ' (-c|-o)' stdout && Exit 1
+grep 'mv ' stdout && Exit 1
+grep 'echo .*oop' stdout && Exit 1
+grep 'CC .*foo\.' stdout
+grep 'CC .*bar\.' stdout
+grep 'CCLD .*foo' stdout
+grep 'CCLD .*bar' stdout
+grep 'PKG-GEN .*oop' stdout
+$MAKE distclean
+
+./configure --disable-silent-rules > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
+  stdout
+$EGREP 'CC|AM_V|GEN' Makefile # For debugging.
+grep '^AM_V_CC =  *\$(am__v_CC_1) *$' Makefile
+grep '^AM_V_GEN =  *\$(am__v_GEN_1) *$' Makefile
+
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout
+grep ' -o foo' stdout
+grep ' -o bar' stdout
+grep 'echo .*>oop' stdout
+$EGREP '(CC|LD) ' stdout && Exit 1
 
 :
diff --git a/tests/silent6.test b/tests/silent6.test
index acd9cea..0e474af 100755
--- a/tests/silent6.test
+++ b/tests/silent6.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 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
@@ -47,14 +47,14 @@ $AUTOCONF
 ./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
 
 $MAKE clean
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'GEN ' stdout && Exit 1
-grep 'cp ' stdout
+grep 'cp \.*/foo\.in foo' stdout
 
 $MAKE distclean
 
@@ -62,7 +62,13 @@ $MAKE distclean
 $MAKE >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'GEN ' stdout && Exit 1
-grep 'cp ' stdout
+grep 'cp \.*/foo\.in foo' stdout
+
+$MAKE clean
+$MAKE V=0 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^ *GEN foo *$' stdout
+grep 'cp ' stdout && Exit 1
 
 $MAKE distclean
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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