[Top][All Lists]

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

RE: basename function in 4.3 cygwin

From: Ronald Hoogenboom
Subject: RE: basename function in 4.3 cygwin
Date: Fri, 21 May 2021 14:46:00 +0000

small makefile to produce what I mean:
------------ cut here ---------------

        @echo $(foreach x,$(TRY),$(firstword $(subst ., ,$x)))

        @echo $(basename $(TRY))
------------- cut here ---------------

"make all" does my workaround "make none" does the 'native' basename.


since 4.x window/cygwin

-----Original Message-----
From: Paul Smith <psmith@gnu.org> 
Sent: Friday, 21 May 2021 4:15 PM
To: Ronald Hoogenboom <RHoogenboom@irdeto.com>; bug-make@gnu.org
Subject: Re: basename function in 4.3 cygwin

On Fri, 2021-05-21 at 08:31 +0000, Ronald Hoogenboom wrote:
> The difference happens when a suffix contains one or more backslashes. 
> This is sometimes needed to escape special behavior of meta characters 
> in the shell. The basename function in 3.81 would return everything up 
> to the last period like documented in the info file, but the basename 
> function in 4.3 apparently considers the backslash in the suffix as a 
> path separator (I guess...).

Can you provide a repro case?

I don't don't know much about Windows, but I don't understand how you can tell 
the difference between a "suffix containing backslashes"
versus a directory that contains a suffix.

Is it not allowed for a directory to contain a suffix in Windows or something?

E.g., is "C:\foo\bar.biz\baz" not a valid file named "biz" in a directory named 
"C:\foo\bar.biz" ?

reply via email to

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