+2003-08-10 Alexandre Duret-Lutz <adl@gnu.org>
+
+ Revert the fix for PR automake/291:
+ * lib/Automake/Variable.pm (define): Do not warn about variables
+ starting with `_' which are an issue on NEWS-OS 4.2R. According
+ to Paul Eggert, NEWS-OS 4.2R is ten years old, the latest version
+ was released on 1996 and is not in wide use. On the other hand,
+ variables starting with `_' are mandatory in several situations,
+ so diagnosing them is more annoying than useful.
+ * tests/canon5.test: Do not use -Wno-portability.
+ * tests/vars2.test: Delete.
+ * tests/Makefile.am (TESTS): Remove vars2.test.
+ Suggested by Jim Meyering.
+
2003-08-09 Raja R Harinath <harinath@acm.org>
* lib/Automake/DisjConditions.pm (ambiguous_p): Simplify slightly.
error $where, "bad characters in variable name `$var'"
if $var !~ /$_VARIABLE_PATTERN/o;
- # NEWS-OS 4.2R complains if a Makefile variable begins with `_'.
- msg ('portability', $where,
- "$var: Make variable names starting with `_' are not portable")
- if $var =~ /^_/;
-
# `:='-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
transform.test \
unused.test \
vars.test \
-vars2.test \
vars3.test \
vartar.test \
version.test \
transform.test \
unused.test \
vars.test \
-vars2.test \
vars3.test \
vartar.test \
version.test \
_foo_SOURCES = foo.c
END
-# Variables starting with `_' are not portable.
-$AUTOMAKE -Wno-portability
+$AUTOMAKE
cat > Makefile.am << 'END'
bin_PROGRAMS = ,foo
,foo_SOURCES = foo.c
END
-# Variables starting with `,' are not portable.
-AUTOMAKE_fails -Wno-portability
+AUTOMAKE_fails
grep 'Makefile.am:2:.*_foo_SOURCES' stderr
cat > Makefile.am << 'END'
_foo_SOURCES = foo.c
END
-# Variables starting with `_' or `,' are not portable.
$AUTOMAKE -Wno-portability
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
-#
-# This file is part of GNU Automake.
-#
-# GNU Automake 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.
-#
-# GNU Automake 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 autoconf; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Check that Automake warns about variables starting with `_'.
-# PR/291
-
-. ./defs || exit 1
-
-set -e
-
-cat >Makefile.am <<EOF
-GOOD_ = 1
-_BAD = 2
- _bad = 3
-EOF
-
-$ACLOCAL
-# Make sure this warning is print in the `portability' category.
-$AUTOMAKE --warnings=no-error,none,portability 2>stderr
-cat stderr
-grep GOOD stderr && exit 1
-grep _BAD stderr
-grep _bad stderr