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 <> 
Sent: Friday, 21 May 2021 4:15 PM
To: Ronald Hoogenboom <>;
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\\baz" not a valid file named "biz" in a directory named 
"C:\foo\" ?

Reply via email to