delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/14/04:03:32

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20100706135928.GQ6521@calimero.vinschen.de>
References: <20100706121100 DOT GA19706 AT sigfpe DOT ibm DOT com> <20100706135928 DOT GQ6521 AT calimero DOT vinschen DOT de>
Date: Wed, 14 Jul 2010 10:03:14 +0200
Message-ID: <AANLkTik4P-vi4sdd0wIjiRkCDBYJ-Y5w3wa88T9Mj5rO@mail.gmail.com>
Subject: Re: weird behavior regarding case sensitivity of GNU make's $(wildcard) function
From: Csaba Raduly <rcsaba AT gmail DOT com>
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, Jul 6, 2010 at 3:59 PM, Corinna Vinschen wrote:
> On Jul =A06 14:11, Robert Schiele wrote:
>> Hi!
>>
>> I found the following (in my optinion weird) behavior of the $(wildcard)
>> function of GNU make when running on Cygwin:
(snip)
>> More generic inspection reveals that apparently the $(wildcard) function=
 seems
>> to be case-insensitive on the directory part but case-sensitive on the f=
ile
>> name part of the absolute path given.
>>
>> Is this kind of expected behavior or does this point to a bug in the GNU=
 make
>> implementation (or even further down in a Cygwin library)?
>
> It looks like this is expected behaviour due to the way make evaluates
> the path in the wildcard function. =A0The strace shows that it simply
> checks for the existence of the parent dir /cygdrive/c/path/to. =A0This
> works, because /cygdrive paths are case-insensitive by default. =A0Next,
> it calls opendir and readdir in a loop to check each file in the
> directory for a match. =A0However, the matching algorithm is case-sensiti=
ve
> by default. =A0This explains the above observation.
>
>> Does anyone know of a reasonable workaround?  Is there a way to make the
>> $(wildcard) function case-insensitive completely (like by setting a spec=
ial
>> option of flag)?  Or is there probably a better replacement function tha=
t does
>> basically the same but in a case-insensitive way?

Basically this is due to Cygwin's underlying implementation and
there's nothing that the make program can do about it (it was written
for Unix where everything is case-sensitive).

> I'd suggest to put your build paths under explicit Cygwin mount points

Another possibility may be to symlink /cygdrive/c/Path/to somewhere
under your Cygwin home.
For example, I have symlinked C:\Users\xxx\Downloads as
/cygwin/home/xxx/dl and access downloaded files as ~/dl/foo

--=20
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torv=
alds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019