automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11-1805-g7a2fa97
Date: Fri, 27 Jan 2012 08:12: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=7a2fa971542b54bb2ea6761764b36a27856659cd

The branch, ng/master has been updated
       via  7a2fa971542b54bb2ea6761764b36a27856659cd (commit)
      from  4ec23a66d3e4149a20dd9e34edbb1ad1c1cd0d05 (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 7a2fa971542b54bb2ea6761764b36a27856659cd
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jan 26 19:08:08 2012 +0100

    [ng] warnings: remove some obsolete portability warnings
    
    With this change, we remove some more portability warnings that were
    only relevant for non-GNU make implementations.  We also add some
    test cases that ensure such warnings stay gone (as improper merges
    from master might bring them back), and to ensure the issues they
    warned about are actually not present with GNU make.
    
    * automake.in (check_directory): Do not check against directories
    named 'obj' (unportable to BSD make).
    * tests/objdir.test: New test.
    * tests/subdir7.test: Remove as obsolete.
    * lib/Automake/Rule.pm (define): Don't warn about ':=' variable
    assignments (unportable to e.g., Solaris make).
    * tests/vars-assign.test: New test.
    * tests/colneq.test: Remove as obsolete.
    * tests/colneq3.test: Remove as redundant.
    * tests/amopts-variable-expansion.test: Adjust not to assume
    occurrences of the obsolete warning anymore.
    * tests/warnings-override.test: Likewise.
    * tests/warnings-precedence.test: Likewise.
    * tests/warnings-strictness-interactions.test: Likewise.
    * tests/warnings-win-over-strictness.test: Likewise.
    * tests/warning-groups-win-over-strictness.test: Likewise.
    * lib/Automake/Rule.pm (define): Don't warn about pattern rules.
    Adjust comments.
    * tests/percent.test: Remove as obsolete.
    * tests/pattern-rules.test: New test.
    * tests/percent2.test: Renamed ...
    * tests/pattern-rules2.test: ... to this, and adjusted.
    * tests/list-of-tests.mk: Adjust.
    * NG-NEWS: Update.

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

Summary of changes:
 NG-NEWS                                           |    6 ++
 automake.in                                       |   20 -------
 lib/Automake/Rule.pm                              |   10 +---
 lib/Automake/Variable.pm                          |   11 +---
 tests/amopts-variable-expansion.test              |    8 ++--
 tests/colneq.test                                 |   33 ------------
 tests/colneq3.test                                |   43 ---------------
 tests/list-of-tests.mk                            |    9 ++--
 tests/{dist-auxfile-2.test => objdir.test}        |   49 ++++++++---------
 tests/{objext-pr10128.test => pattern-rules.test} |   59 +++++++++++----------
 tests/{percent2.test => pattern-rules2.test}      |    8 +--
 tests/percent.test                                |   36 -------------
 tests/subdir7.test                                |   46 ----------------
 tests/{extra10.test => vars-assign.test}          |   37 ++++++++-----
 tests/warning-groups-win-over-strictness.test     |    7 ++-
 tests/warnings-override.test                      |    7 ++-
 tests/warnings-precedence.test                    |    7 ++-
 tests/warnings-strictness-interactions.test       |    7 ++-
 tests/warnings-win-over-strictness.test           |    7 ++-
 19 files changed, 116 insertions(+), 294 deletions(-)
 delete mode 100755 tests/colneq.test
 delete mode 100755 tests/colneq3.test
 copy tests/{dist-auxfile-2.test => objdir.test} (55%)
 copy tests/{objext-pr10128.test => pattern-rules.test} (55%)
 rename tests/{percent2.test => pattern-rules2.test} (83%)
 delete mode 100755 tests/percent.test
 delete mode 100755 tests/subdir7.test
 copy tests/{extra10.test => vars-assign.test} (62%)

diff --git a/NG-NEWS b/NG-NEWS
index f1b0ec3..621cd86 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -44,6 +44,12 @@ Warnings and diagnostic
   - calls to make functions, whether built-in ones like "$(wildcard *.c)"
     or user-defined ones like "$(call my-func, arg1, arg2)".
 
+  - pattern rules in GNU make style ("%.o: %.c").
+
+  - variable definitions with ":=", as in "foo := $(immediate-evaluation)".
+
+  - some issues specific to BSD make.
+
 * The 'portability-recursive' warning category is obsolete, and has been
   removed.
 
diff --git a/automake.in b/automake.in
index 521d6cf..087c3c0 100644
--- a/automake.in
+++ b/automake.in
@@ -3882,26 +3882,6 @@ sub check_directory ($$;$)
   error $where, "required directory $reldir/$dir does not exist"
     unless -d "$reldir/$dir";
 
-  # If an `obj/' directory exists, BSD make will enter it before
-  # reading `Makefile'.  Hence the `Makefile' in the current directory
-  # will not be read.
-  #
-  #  % cat Makefile
-  #  all:
-  #          echo Hello
-  #  % cat obj/Makefile
-  #  all:
-  #          echo World
-  #  % make      # GNU make
-  #  echo Hello
-  #  Hello
-  #  % pmake     # BSD make
-  #  echo World
-  #  World
-  msg ('portability', $where,
-       "naming a subdirectory `obj' causes troubles with BSD make")
-    if $dir eq 'obj';
-
   # `aux' is probably the most important of the following forbidden name,
   # since it's tempting to use it as an AC_CONFIG_AUX_DIR.
   msg ('portability', $where,
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index 6d437ed..f0bfcbb 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006, 2007, 2010, 2011 Free Software
+# Copyright (C) 2003, 2004, 2006, 2007, 2010, 2011, 2012 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -625,11 +625,6 @@ sub define ($$$$$)
     }
 
 
-  # A GNU make-style pattern rule has a single "%" in the target name.
-  msg ('portability', $where,
-       "`%'-style pattern rules are a GNU make extension")
-    if $target =~ /^[^%]*%[^%]*$/;
-
   # Diagnose target redefinitions.
   if ($tdef)
     {
@@ -647,8 +642,7 @@ sub define ($$$$$)
          if ($oldowner == RULE_USER)
            {
              # Ignore `%'-style pattern rules.  We'd need the
-             # dependencies to detect duplicates, and they are
-             # already diagnosed as unportable by -Wportability.
+             # dependencies to detect duplicates.
              if ($target !~ /^[^%]*%[^%]*$/)
                {
                  ## FIXME: Presently we can't diagnose duplicate user rules
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index beead54..f8e8638 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -1,5 +1,5 @@
-# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2012 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
@@ -804,13 +804,6 @@ sub define ($$$$$$$$)
                               || $pretty == VAR_SILENT
                               || $pretty == VAR_SORTED);
 
-  # `:='-style assignments are not acknowledged by POSIX.  Moreover it
-  # has multiple meanings.  In GNU make or BSD make it means "assign
-  # with immediate expansion", while in OSF make it is used for
-  # conditional assignments.
-  msg ('portability', $where, "`:='-style assignments are not portable")
-    if $type eq ':';
-
   # If there's a comment, make sure it is \n-terminated.
   if ($comment)
     {
diff --git a/tests/amopts-variable-expansion.test 
b/tests/amopts-variable-expansion.test
index 05fe6c8..ade2849 100755
--- a/tests/amopts-variable-expansion.test
+++ b/tests/amopts-variable-expansion.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -28,7 +28,7 @@ AC_CONFIG_FILES([Makefile])
 END
 
 cat > Makefile.am <<'END'
-# The following should expand to `-Wnone -Wno-error foreign -Wportability'.
+# The following should expand to '-Wnone -Wno-error foreign -Wportability'.
 AUTOMAKE_OPTIONS = $(foo) foreign
 AUTOMAKE_OPTIONS += ${bar}
 foo = $(foo1)
@@ -38,14 +38,14 @@ foo2 += $(foo3)
 foo3 = -Wno-error
 bar = -Wportability
 # This will give a warning with `-Wportability'.
-zardoz :=
+.aaa.bbb .ccc.ddd:
 # This would give a warning with `-Woverride'.
 install:
 END
 
 $ACLOCAL
 AUTOMAKE_run
-grep '^Makefile\.am:.*:=.*not portable' stderr
+grep '^Makefile\.am:.*inference rules can have only one target' stderr
 grep README stderr && Exit 1
 $EGREP '(install|override)' stderr && Exit 1
 
diff --git a/tests/colneq.test b/tests/colneq.test
deleted file mode 100755
index b60d5c0..0000000
--- a/tests/colneq.test
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 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
-# 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/>.
-
-# Test that := definitions produce warnings, but otherwise work.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-ICONS := $(wildcard *.xbm)
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep ':=.*not portable' stderr
-
-$AUTOMAKE -Wno-portability
-grep '^ICONS *:= *\$(wildcard \*\.xbm) *$' Makefile.in
-
-:
diff --git a/tests/colneq3.test b/tests/colneq3.test
deleted file mode 100755
index d2f14dd..0000000
--- a/tests/colneq3.test
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Copyright (C) 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
-# 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/>.
-
-# Test that := definitions work as expected at make time.
-
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-BAR := $(FOO)
-BAZ = $(FOO)
-FOO := foo
-.PHONY: test
-test:
-       test x'$(FOO)' = x'foo'
-       test x'$(BAZ)' = x'foo'
-       test x'$(BAR)' = x
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -Wno-portability
-
-./configure
-$MAKE test
-
-:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 4ee2b36..8f66c26 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -182,9 +182,7 @@ check-concurrency-bug9245.test \
 checkall.test \
 clean.test \
 clean2.test \
-colneq.test \
 colneq2.test \
-colneq3.test \
 colon.test \
 colon2.test \
 colon3.test \
@@ -657,6 +655,7 @@ notrans.test \
 number.test \
 objc.test \
 objc2.test \
+objdir.test \
 objext-pr10128.test \
 obsolete.test \
 oldvars.test \
@@ -679,6 +678,8 @@ override-conditional-1.test \
 override-conditional-2.test \
 override-html.test \
 override-suggest-local.test \
+pattern-rules.test \
+pattern-rules2.test \
 parallel-am.test \
 parallel-am2.test \
 parallel-am3.test \
@@ -753,8 +754,6 @@ test-trs-recover2.test \
 test-extensions.test \
 test-extensions-cond.test \
 parse.test \
-percent.test \
-percent2.test \
 phony.test \
 pluseq.test \
 pluseq2.test \
@@ -948,7 +947,6 @@ subdir3.test \
 subdir4.test \
 subdir5.test \
 subdir6.test \
-subdir7.test \
 subdir8.test \
 subdir9.test \
 subdir10.test \
@@ -1141,6 +1139,7 @@ vala5.test \
 vala-vpath.test \
 vala-mix.test \
 vars.test \
+vars-assign.test \
 vartar.test \
 vartypos.test \
 vartypo2.test \
diff --git a/tests/dist-auxfile-2.test b/tests/objdir.test
similarity index 55%
copy from tests/dist-auxfile-2.test
copy to tests/objdir.test
index 77e6ffb..496a425 100755
--- a/tests/dist-auxfile-2.test
+++ b/tests/objdir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012 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,47 +14,46 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Files specified by AC_REQUIRE_AUX_FILE must exist, and if a Makefile
-# is present in the build-aux directory, they correctly get automatically
-# distributed.
-# Related to automake bug#9651.
+# A directory named 'obj' could create problems with BSD make, but
+# shouldn't with GNU make; so check that
+#  - the old portability warning diagnosing it is gone, and
+#  - such a directory truly causes no problems with GNU make.
 
 am_create_testdir=empty
 . ./defs || Exit 1
 
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
-AC_CONFIG_AUX_DIR([sub])
+AC_CONFIG_AUX_DIR([obj])
 AM_INIT_AUTOMAKE
-AC_REQUIRE_AUX_FILE([zardoz])
-AC_CONFIG_FILES([Makefile sub/Makefile])
+AC_REQUIRE_AUX_FILE([Makefile])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-cat > Makefile.am <<'END'
-SUBDIRS = sub
-test: distdir
-       ls -l $(distdir) $(distdir)/* ;: For debugging.
-       test -f $(distdir)/sub/zardoz
-.PHONY: test
-check-local: test
+mkdir obj
+cat > obj/Makefile <<'END'
+$(error GNU make should not consider this)
+all:
+       echo "GNU make should not consider this"; exit 1
 END
 
-mkdir sub
-: > sub/Makefile.am
-
-echo dummy > sub/zardoz
+cat > Makefile.am <<'END'
+check-local:
+       test -f $(srcdir)/obj/Makefile
+END
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE -a
-test -f sub/install-sh
-# Should work also without `--add-missing'.
-$AUTOMAKE
+$AUTOCONF
 
-./configure
+test -f obj/install-sh
+test ! -f install-sh
 
-$MAKE test
+./configure
+# This first make invocation actually fails with NetBSD make
+# and FreeBSD 8.2 make.
+$MAKE
 $MAKE distcheck
 
 :
diff --git a/tests/objext-pr10128.test b/tests/pattern-rules.test
similarity index 55%
copy from tests/objext-pr10128.test
copy to tests/pattern-rules.test
index 120986c..27c1f53 100755
--- a/tests/objext-pr10128.test
+++ b/tests/pattern-rules.test
@@ -14,45 +14,46 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for automake bug#10128: $(OBJEXT) redefinition causes
-# $(foo_OBJECTS) to be defined as empty.
+# Automake do not complain about nor messes up pattern rules.
 
 . ./defs || Exit 1
 
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
-LINK = echo >$@ Linked $@ from
-OBJEXT = fasl
-EXEEXT =
-
-noinst_PROGRAMS = foo zardoz
-foo_SOURCES = foo.lisp
-zardoz_SOURCES = mu1.lisp mu2.lisp
-
-## Un-commenting this is enough to make the test pass.  Weird!
-##.lisp.o:
-
-.lisp.fasl:
-       touch $@
-
-.PHONY: test
-test:
-       test '$(foo_OBJECTS)'    = 'foo.fasl'
-       test '$(zardoz_OBJECTS)' = 'mu1.fasl mu2.fasl'
+foo/%.out: bar/%.in
+       test -d $(dir $@) || $(MKDIR_P) $(dir $@)
+       cp $< $@
+%.sh: %/z
+       cp $< $@
+%:
+       echo True > $@
+noinst_DATA = foo/one.out
+noinst_SCRIPTS = two.sh mu.py
 END
 
+mkdir bar two
+echo "123456789" > bar/one.in
+echo "#!/bin/sh" > two/z
+
 $ACLOCAL
-$AUTOMAKE
 $AUTOCONF
+$AUTOMAKE
 
-./configure
-$MAKE test
-touch foo.lisp mu1.lisp mu2.lisp
-$MAKE all
-cat foo
-cat zardoz
-test "`cat foo`"    = "Linked foo from foo.fasl"
-test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+for vpath in : false; do
+  if $vpath; then
+    mkdir build
+    cd build
+    srcdir=..
+  else
+    srcdir=.
+  fi
+  $srcdir/configure
+  $MAKE
+  diff $srcdir/bar/one.in ./foo/one.out
+  diff $srcdir/two/z ./two.sh
+  test `cat mu.py` = True
+  cd $srcdir
+done
 
 :
diff --git a/tests/percent2.test b/tests/pattern-rules2.test
similarity index 83%
rename from tests/percent2.test
rename to tests/pattern-rules2.test
index 33cbe9c..5b92687 100755
--- a/tests/percent2.test
+++ b/tests/pattern-rules2.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011, 2012 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,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Another test for -Wportability warning about %-style rules, plus
+# Support for pattern rules:
 # make sure we don't warn about duplicate definition for
 # `${ARCH}/%.$(OBJEXT):'.
 # Report from Ralf Corsepius.
@@ -32,8 +32,4 @@ ${ARCH}/%.$(OBJEXT): %.c
 EOF
 
 $ACLOCAL
-AUTOMAKE_fails
-grep '%.*pattern.*rules' stderr
-
-# No error otherwise.
 $AUTOMAKE -Wno-portability
diff --git a/tests/percent.test b/tests/percent.test
deleted file mode 100755
index 492d0e0..0000000
--- a/tests/percent.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2002, 2003, 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
-# 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/>.
-
-# Test to make sure that -Wportability understands %-style pattern
-# rules.
-
-. ./defs || Exit 1
-
-cat >>configure.in <<EOF
-AC_PROG_CC
-EOF
-
-cat >Makefile.am <<EOF
-bin_PROGRAMS = liver
-liver_SOURCES = foo.c
-
-%.o: %.c
-       echo "gnu make extension"
-EOF
-
-$ACLOCAL
-AUTOMAKE_fails -Wportability
-grep 'Makefile.am:4:.*%' stderr
diff --git a/tests/subdir7.test b/tests/subdir7.test
deleted file mode 100755
index 28fe024..0000000
--- a/tests/subdir7.test
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 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
-# 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/>.
-
-# Naming a subdirectory `obj/' is a bad idea.  Automake should say so.
-
-. ./defs || Exit 1
-
-mkdir obj
-
-cat >>configure.in << 'END'
-AC_CONFIG_FILES([obj/Makefile])
-AC_OUTPUT
-END
-
-: > obj/Makefile.am
-echo 'SUBDIRS = obj' >Makefile.am
-
-$ACLOCAL
-
-AUTOMAKE_fails
-grep 'Makefile.am:1:.*obj.*BSD' stderr
-
-cat >Makefile.am <<'END'
-SUBDIRS = @STH@
-FOO = obj
-DIST_SUBDIRS = $(FOO)
-END
-
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*obj.*BSD' stderr
-
-:
diff --git a/tests/extra10.test b/tests/vars-assign.test
similarity index 62%
copy from tests/extra10.test
copy to tests/vars-assign.test
index 302ad77..46bb29e 100755
--- a/tests/extra10.test
+++ b/tests/vars-assign.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012 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,28 +14,35 @@
 # 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 that wildcards in EXTRA_DIST are honoured.
-# Suggested by observations from Braden McDaniel.
+# Automake do not complain about nor messes up GNU make specific
+# variable assignments (":=" and "?=").
 
 . ./defs || Exit 1
 
 echo AC_OUTPUT >> configure.in
 
+unset PREFOO FOO BAR BAZ XFOO XBAZ || :
+
 cat > Makefile.am <<'END'
-EXTRA_DIST=*.foo
-.PHONY: test
-test: distdir
-       diff a.foo $(distdir)/a.foo
-       diff b.foo $(distdir)/b.foo
-       test ! -r $(distdir)/c.bar
+PREFOO = bar
+FOO := foo$(PREFOO)$(XFOO)
+XFOO = fail
+BAR ?= barbar
+
+.PHONY: test1 test2
+test1:
+       test $(FOO) = foobar
+       test $(BAR) = barbar
+test2:
+       test $(FOO) = foobar
+       test $(BAR) = rabrab
 END
 
 $ACLOCAL
-$AUTOMAKE
 $AUTOCONF
-
-echo aaa > a.foo
-echo bbb > b.foo
-echo ccc > c.foo
+$AUTOMAKE
 ./configure
-$MAKE test
+$MAKE test1
+PREFOO=notseen FOO=notseen BAR=rabrab $MAKE test2
+
+:
diff --git a/tests/warning-groups-win-over-strictness.test 
b/tests/warning-groups-win-over-strictness.test
index 7e3f526..86728c6 100755
--- a/tests/warning-groups-win-over-strictness.test
+++ b/tests/warning-groups-win-over-strictness.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -39,7 +39,8 @@ END
 
 cat > Makefile.am <<END
 include automake-options.am
-FOO := bar
+.c.o .c.obj:
+       @echo bad
 END
 
 rm -rf autom4te*.cache
@@ -47,7 +48,7 @@ rm -rf autom4te*.cache
 echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
 $ACLOCAL
 AUTOMAKE_fails -Werror -Wall --foreign
-grep '^Makefile\.am:.*:=.*not portable' stderr
+grep '^Makefile\.am:.*inference rules can have only one target' stderr
 
 rm -rf autom4te*.cache
 : > automake-options.am
diff --git a/tests/warnings-override.test b/tests/warnings-override.test
index aa7da67..73c36a3 100755
--- a/tests/warnings-override.test
+++ b/tests/warnings-override.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -27,7 +27,8 @@
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
 cat > Makefile.am <<'END'
-FOO := bar
+.c.o .c.obj:
+       @echo bad
 AUTOMAKE_OPTIONS =
 END
 
@@ -49,7 +50,7 @@ ok ()
 ko ()
 {
   AUTOMAKE_fails $*
-  grep '^Makefile\.am:1:.*:=.*not portable' stderr
+  grep '^Makefile\.am:1:.*inference rules can have only one target' stderr
 }
 
 $ACLOCAL
diff --git a/tests/warnings-precedence.test b/tests/warnings-precedence.test
index f191c1a..bd6c2b7 100755
--- a/tests/warnings-precedence.test
+++ b/tests/warnings-precedence.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -24,7 +24,8 @@
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
 cat > Makefile.am <<'END'
-FOO := bar
+.c.o .c.obj:
+       @echo bad
 AUTOMAKE_OPTIONS =
 END
 
@@ -46,7 +47,7 @@ ok ()
 ko ()
 {
   AUTOMAKE_fails $*
-  grep '^Makefile\.am:1:.*:=.*not portable' stderr
+  grep '^Makefile\.am:1:.*inference rules can have only one target' stderr
 }
 
 # Files required in gnu strictness.
diff --git a/tests/warnings-strictness-interactions.test 
b/tests/warnings-strictness-interactions.test
index 85669d7..1cd557e 100755
--- a/tests/warnings-strictness-interactions.test
+++ b/tests/warnings-strictness-interactions.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -25,7 +25,8 @@ AUTOMAKE="$am_original_AUTOMAKE -Werror"
 
 cat > Makefile.am <<END
 AUTOMAKE_OPTIONS =
-FOO := bar
+.c.o .c.obj:
+       @echo bad
 END
 
 set_am_opts ()
@@ -54,6 +55,6 @@ set_am_opts 'gnu' Makefile.am
 
 AUTOMAKE_fails
 $ACLOCAL
-grep '^Makefile\.am:2:.*:=.*not portable' stderr
+grep '^Makefile\.am:2:.*inference rules can have only one target' stderr
 
 :
diff --git a/tests/warnings-win-over-strictness.test 
b/tests/warnings-win-over-strictness.test
index a577dfe..cf8e6f2 100755
--- a/tests/warnings-win-over-strictness.test
+++ b/tests/warnings-win-over-strictness.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -31,7 +31,7 @@ ok ()
 ko ()
 {
   AUTOMAKE_run $*
-  grep '^Makefile\.am:.*:=.*not portable' stderr
+  grep '^Makefile\.am:.*inference rules can have only one target' stderr
   test `wc -l <stderr` -eq 1
 }
 
@@ -50,7 +50,8 @@ touch README INSTALL NEWS AUTHORS ChangeLog COPYING
 
 cat > Makefile.am <<END
 AUTOMAKE_OPTIONS =
-FOO := bar
+.c.o .c.obj:
+       @echo bad
 END
 
 $ACLOCAL


hooks/post-receive
-- 
GNU Automake



reply via email to

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