On Tue, Jul 6, 2010 at 3:59 PM, Corinna Vinschen wrote: > On Jul 6 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 file >> 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. The strace shows that it simply > checks for the existence of the parent dir /cygdrive/c/path/to. This > works, because /cygdrive paths are case-insensitive by default. Next, > it calls opendir and readdir in a loop to check each file in the > directory for a match. However, the matching algorithm is case-sensitive > by default. This 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 special >> option of flag)? Or is there probably a better replacement function that >> 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 -- Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "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

