GNU bug report logs -
#71534
[PATCH] aclocal: support ACLOCAL_PATH correctly on OS/2
Previous Next
Reported by: KO Myung-Hun <komh78 <at> gmail.com>
Date: Thu, 13 Jun 2024 11:22:02 UTC
Severity: normal
Tags: patch
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71534 in the body.
You can then email your comments to 71534 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Thu, 13 Jun 2024 11:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
KO Myung-Hun <komh78 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
automake-patches <at> gnu.org
.
(Thu, 13 Jun 2024 11:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
A path separator is ';' on OS/2. Therefore, splitting ACLOCAL_PATH with
':' unconditionally is not correct.
* bin/aclocal.in (parse_ACLOCAL_PATH): Use ';' as a path separator on
OS/2.
---
bin/aclocal.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/aclocal.in b/bin/aclocal.in
index 785263fdc..96b8c68d6 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -1169,7 +1169,8 @@ sub parse_ACLOCAL_PATH ()
# directories, so we use unshift. However, directories that
# come first in ACLOCAL_PATH take precedence over directories
# coming later, which is why the result of split is reversed.
- foreach my $dir (reverse split /:/, $ENV{"ACLOCAL_PATH"})
+ my $sep = $^O eq 'os2' ? ';' : ':';
+ foreach my $dir (reverse split /$sep/, $ENV{"ACLOCAL_PATH"})
{
unshift (@system_includes, $dir) if $dir ne '' && -d $dir;
}
--
2.42.0
Information forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Thu, 13 Jun 2024 21:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71534 <at> debbugs.gnu.org (full text, mbox):
+ my $sep = $^O eq 'os2' ? ';' : ':';
+ foreach my $dir (reverse split /$sep/, $ENV{"ACLOCAL_PATH"})
Ok, thanks.
If we're going to worry about os2, then surely $O =~ /MSWin/ should also
be ;-separated paths. I'll add that in. (Though I feel surprised that
these tools can be used at all on such systems.) --thanks, karl.
Information forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Thu, 13 Jun 2024 21:57:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 71534 <at> debbugs.gnu.org (full text, mbox):
On Thu, Jun 13, 2024, at 5:44 PM, Karl Berry wrote:
> + my $sep = $^O eq 'os2' ? ';' : ':';
> + foreach my $dir (reverse split /$sep/, $ENV{"ACLOCAL_PATH"})
>
> Ok, thanks.
>
> If we're going to worry about os2, then surely $O =~ /MSWin/ should also
> be ;-separated paths
Isn't there a $variable already that's specifically the path separator? I thought we had one. Check in Perl's built-in Config module as well as automaker proper.
zw
Information forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Thu, 13 Jun 2024 22:38:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 71534 <at> debbugs.gnu.org (full text, mbox):
Isn't there a $variable already that's specifically the path
separator?
What I see is core Perl:
use Config;
... $Config{"path_sep"} ...
I thought we had one.
The above is not currently used anywhere in Automake.
There are pervasive uses of $PATH_SEPARATOR in shell code,
but no determination of the path separator in Perl code that I can see.
Check in Perl's built-in Config module
Indeed. I guess {path_sep} has been available forever,
but I still fear breaking new ground.
Also, since the Config module is based on the compile-time Configure
output, there are warnings that it "cannot always be trusted".
Maybe it would never come up for Automake, but then again, maybe it would.
as well as automaker proper.
Nothing in Automake::Config or anything else that I can find.
I have to admit I am tempted to just match $^O and be done with it,
instead of using something that could lead to more problems in the
future. From what I've seen of other code, using $^O is a lot more
common than using $Config. (Anecdotally speaking.) --thanks, karl.
Information forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Sun, 16 Jun 2024 15:43:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 71534 <at> debbugs.gnu.org (full text, mbox):
- foreach my $dir (reverse split /:/, $ENV{"ACLOCAL_PATH"})
+ my $sep = $^O eq 'os2' ? ';' : ':';
+ foreach my $dir (reverse split /$sep/, $ENV{"ACLOCAL_PATH"})
Thanks for the report. I added a check for Windows and committed it.
--best, karl.
-----------------------------------------------------------------------------
aclocal: path separator is ; on OS/2 and Windows.
Adapted from and fixes https://bugs.gnu.org/71534.
* bin/aclocal.in (parse_ACLOCAL_PATH): use $^O to recognize OS/2
and Windows for the environment path element separator.
* NEWS: mention this.
diff --git a/NEWS b/NEWS
index 37a66df03..7aae0f92f 100644
--- a/NEWS
+++ b/NEWS
@@ -106,8 +106,10 @@ New in 1.17:
- Pass any options given to AM_PROG_LEX on to AC_PROG_LEX.
(bug#65600, bug#65730)
+ - aclocal: recognize ; as path separator on OS/2 and Windows. (bug#71534)
+
- Hash iterations with external effects now consistently sort keys.
- (bug#25629)
+ (bug#25629, bug#46744)
- tests: avoid some declaration conflicts for lex et al. on SunOS.
(bug#34151 and others)
diff --git a/bin/aclocal.in b/bin/aclocal.in
index 814862af2..140c5ad29 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -1165,11 +1165,18 @@ sub parse_arguments ()
sub parse_ACLOCAL_PATH ()
{
return if not defined $ENV{"ACLOCAL_PATH"};
+
# Directories in ACLOCAL_PATH should take precedence over system
# directories, so we use unshift. However, directories that
# come first in ACLOCAL_PATH take precedence over directories
# coming later, which is why the result of split is reversed.
- foreach my $dir (reverse split /:/, $ENV{"ACLOCAL_PATH"})
+
+ # OS/2 and Windows (but not Cygwin, etc.) use ; for the path separator.
+ # Possibly it would be cleaner to use path_sep from Config,
+ # but this seems simpler.
+ my $path_sep = $^O =~ /^(os2|mswin)/i ? ';' : ':';
+
+ foreach my $dir (reverse split $path_sep, $ENV{"ACLOCAL_PATH"})
{
unshift (@system_includes, $dir) if $dir ne '' && -d $dir;
}
compile finished at Sun Jun 16 08:41:06 2024
Reply sent
to
Karl Berry <karl <at> freefriends.org>
:
You have taken responsibility.
(Sun, 16 Jun 2024 15:43:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
KO Myung-Hun <komh78 <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 16 Jun 2024 15:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
automake-patches <at> gnu.org
:
bug#71534
; Package
automake-patches
.
(Mon, 17 Jun 2024 00:20:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 71534 <at> debbugs.gnu.org (full text, mbox):
Karl Berry wrote:
> - foreach my $dir (reverse split /:/, $ENV{"ACLOCAL_PATH"})
> + my $sep = $^O eq 'os2' ? ';' : ':';
> + foreach my $dir (reverse split /$sep/, $ENV{"ACLOCAL_PATH"})
>
> Thanks for the report. I added a check for Windows and committed it.
> --best, karl.
>
Thanks!
--
KO Myung-Hun
Korean OS/2 User Community : https://www.os2.kr/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 15 Jul 2024 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.