[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-ng] [PATCH] [ng] warnings: remove some obsolete portability wa
From: |
Stefano Lattarini |
Subject: |
[Automake-ng] [PATCH] [ng] warnings: remove some obsolete portability warnings |
Date: |
Thu, 26 Jan 2012 20:59:29 +0100 |
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.
---
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/objdir.test | 59 +++++++++++++++++++++++++
tests/pattern-rules.test | 59 +++++++++++++++++++++++++
tests/{percent2.test => pattern-rules2.test} | 8 +---
tests/percent.test | 36 ---------------
tests/subdir7.test | 46 -------------------
tests/vars-assign.test | 48 ++++++++++++++++++++
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, 206 insertions(+), 225 deletions(-)
delete mode 100755 tests/colneq.test
delete mode 100755 tests/colneq3.test
create mode 100755 tests/objdir.test
create mode 100755 tests/pattern-rules.test
rename tests/{percent2.test => pattern-rules2.test} (83%)
delete mode 100755 tests/percent.test
delete mode 100755 tests/subdir7.test
create mode 100755 tests/vars-assign.test
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/objdir.test b/tests/objdir.test
new file mode 100755
index 0000000..496a425
--- /dev/null
+++ b/tests/objdir.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# 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
+# 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/>.
+
+# 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([obj])
+AM_INIT_AUTOMAKE
+AC_REQUIRE_AUX_FILE([Makefile])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+mkdir obj
+cat > obj/Makefile <<'END'
+$(error GNU make should not consider this)
+all:
+ echo "GNU make should not consider this"; exit 1
+END
+
+cat > Makefile.am <<'END'
+check-local:
+ test -f $(srcdir)/obj/Makefile
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+test -f obj/install-sh
+test ! -f install-sh
+
+./configure
+# This first make invocation actually fails with NetBSD make
+# and FreeBSD 8.2 make.
+$MAKE
+$MAKE distcheck
+
+:
diff --git a/tests/pattern-rules.test b/tests/pattern-rules.test
new file mode 100755
index 0000000..27c1f53
--- /dev/null
+++ b/tests/pattern-rules.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# 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
+# 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/>.
+
+# Automake do not complain about nor messes up pattern rules.
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+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
+$AUTOCONF
+$AUTOMAKE
+
+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/vars-assign.test b/tests/vars-assign.test
new file mode 100755
index 0000000..46bb29e
--- /dev/null
+++ b/tests/vars-assign.test
@@ -0,0 +1,48 @@
+#! /bin/sh
+# 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
+# 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/>.
+
+# 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'
+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
+$AUTOCONF
+$AUTOMAKE
+./configure
+$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
--
1.7.7.3
- [Automake-ng] [PATCH] [ng] warnings: remove some obsolete portability warnings,
Stefano Lattarini <=