automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: aclocal: path separator is ; on


From: Karl Berry
Subject: [automake-commit] branch master updated: aclocal: path separator is ; on OS/2 and Windows.
Date: Sun, 16 Jun 2024 11:41:17 -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=e09ee9748d104e3199e32a02c2347658c3f051f7

The following commit(s) were added to refs/heads/master by this push:
     new e09ee9748 aclocal: path separator is ; on OS/2 and Windows.
e09ee9748 is described below

commit e09ee9748d104e3199e32a02c2347658c3f051f7
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Sun Jun 16 08:41:06 2024 -0700

    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.
---
 NEWS           | 4 +++-
 bin/aclocal.in | 9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

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;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]