[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: automake: do not warn that POSI
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: automake: do not warn that POSIX variables are non-POSIX. |
Date: |
Sat, 01 Jul 2023 11:35:06 -0400 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4bd4640e03670e267d9763d377f107c09b4f2202
The following commit(s) were added to refs/heads/master by this push:
new 4bd4640e0 automake: do not warn that POSIX variables are non-POSIX.
4bd4640e0 is described below
commit 4bd4640e03670e267d9763d377f107c09b4f2202
Author: Bogdan <bogdro_rep@gmx.us>
AuthorDate: Sat Jul 1 08:34:55 2023 -0700
automake: do not warn that POSIX variables are non-POSIX.
This change fixes https://bugs.gnu.org/9587.
* lib/Automake/Variable.pm (_VARIABLE_PATTERN_EXTRA_POSIX):
new variable for $(*D) and the like.
(_VARIABLE_PATTERN): use it.
* t/vars3.sh: update test.
* NEWS: mention this.
POSIX spec (currently):
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
---
NEWS | 6 ++++++
lib/Automake/Variable.pm | 4 +++-
t/vars3.sh | 21 ++++++++++++++++++++-
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index b73c92569..61d631ba0 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,12 @@ New in 1.17:
- Emacs Lisp compilations respects silent make output.
+ - Automake no longer incorrectly warns that the POSIX make variables
+ $(*D) and the like are non-POSIX. Unfortunately, the make
+ implementations which do not correctly implement all the POSIX
+ variables are not detected, but this seems to have little impact
+ in practice. (bug#9587)
+
- distcleancheck ignores "silly rename" files (.nfs* .smb* .__afs*)
that can show up on network file systems.
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 2c118314e..8bafc8e3a 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -132,7 +132,9 @@ non-object).
=cut
my $_VARIABLE_CHARACTERS = '[.A-Za-z0-9_@]+';
-my $_VARIABLE_PATTERN = '^' . $_VARIABLE_CHARACTERS . "\$";
+my $_VARIABLE_PATTERN_EXTRA_POSIX = '[*?<%][DF]?';
+my $_VARIABLE_PATTERN = '^(' . $_VARIABLE_CHARACTERS
+ . '|' . $_VARIABLE_PATTERN_EXTRA_POSIX . ")\$";
my $_VARIABLE_RECURSIVE_PATTERN =
'^([.A-Za-z0-9_@]|\$[({]' . $_VARIABLE_CHARACTERS . '[})]?)+' . "\$";
diff --git a/t/vars3.sh b/t/vars3.sh
index ae89a6869..cbba47e68 100644
--- a/t/vars3.sh
+++ b/t/vars3.sh
@@ -15,7 +15,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that Automake warns about variables containing spaces
-# and other non-POSIX characters.
+# and other non-POSIX characters, but not about real POSIX
+# variables (see bug#9587).
. test-init.sh
@@ -32,6 +33,10 @@ L08$(o u c h): $(wildcard *.c)
echo $${ok-this is}
L11: $(thisis) $(ok)
${here}
+just_a_test:
+ echo "$(@F) $(%F) $(?F) $(<F) $(*F) $(@D) $(%D) $(?D) $(<D) $(*D)" > $@
+ echo "$(%) $(?) $(<) $(*)" > $@
+ echo "$% $? $< $*" > $@
EOF
$ACLOCAL
@@ -59,6 +64,20 @@ grep ':8:.*wildcard' stderr
grep ':9:.*another Error' stderr
$EGREP 'ok|thisis|here' stderr && exit 1
+grep '@F' stderr && exit 1
+grep '%F' stderr && exit 1
+grep '?F' stderr && exit 1
+grep '<F' stderr && exit 1
+grep '*F' stderr && exit 1
+grep '@D' stderr && exit 1
+grep '%D' stderr && exit 1
+grep '?D' stderr && exit 1
+grep '<D' stderr && exit 1
+grep '*D' stderr && exit 1
+grep ': %: ' stderr && exit 1
+grep ': ?: ' stderr && exit 1
+grep ': <: ' stderr && exit 1
+grep ': *: ' stderr && exit 1
# None of these errors be diagnosed with '-Wno-portability'.
$AUTOMAKE -Wno-portability
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: automake: do not warn that POSIX variables are non-POSIX.,
Karl Berry <=