Revert the fix for PR automake/291:
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 9 Aug 2003 22:34:30 +0000 (22:34 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 9 Aug 2003 22:34:30 +0000 (22:34 +0000)
* 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.

ChangeLog
lib/Automake/Variable.pm
tests/Makefile.am
tests/Makefile.in
tests/canon5.test
tests/vars2.test [deleted file]

index 684306d..d98843c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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.
index 63e8d63..4cce9fb 100644 (file)
@@ -948,11 +948,6 @@ sub define ($$$$$$$$)
   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
index 11fb3f5..f9c2b72 100644 (file)
@@ -457,7 +457,6 @@ txinfo22.test \
 transform.test \
 unused.test \
 vars.test \
-vars2.test \
 vars3.test \
 vartar.test \
 version.test \
index d11cdb9..c8878a5 100644 (file)
@@ -568,7 +568,6 @@ txinfo22.test \
 transform.test \
 unused.test \
 vars.test \
-vars2.test \
 vars3.test \
 vartar.test \
 version.test \
index 6db9f36..b74708d 100755 (executable)
@@ -40,16 +40,14 @@ bin_PROGRAMS = _foo
 _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'
@@ -57,5 +55,4 @@ bin_PROGRAMS = ,foo
 _foo_SOURCES = foo.c
 END
 
-# Variables starting with `_' or `,' are not portable.
 $AUTOMAKE -Wno-portability
diff --git a/tests/vars2.test b/tests/vars2.test
deleted file mode 100755 (executable)
index 35e1acd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /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