* RE: RE: MAKE - problem with small/capital letters in filenames
@ 2002-10-31 8:52 Harig, Mark A.
2002-10-31 9:11 ` Igor Pechtchanski
0 siblings, 1 reply; 4+ messages in thread
From: Harig, Mark A. @ 2002-10-31 8:52 UTC (permalink / raw)
To: Graff_Zoltan, cygwin
try:
%.D: %.C
or
%.d: %.C
> -----Original Message-----
> From: Graff_Zoltan [mailto:zotyo@z1.fszek.hu]
> Sent: Thursday, October 31, 2002 5:24 AM
> To: Harig, Mark A.
> Subject: Re: RE: MAKE - problem with small/capital letters in
> filenames
>
>
> > $ ls makefile hello.c
> > hello.c makefile
> Yes, it works if hello.c exists. But not work when HELLO.C exist.
> My files are on the netware file server, and I see all files with
> upper case letters under WinXp.
> Under DOS and Linux the makefile works only with lower case letters.
>
> If I change the '%.d: %.c'
> line to 'hello.d: hello.c' (with lower case letters)
> it works well.
>
> %.c isn't good, but hello.c is?
> Are the upper and lower case letters equal in file names, or not?
> If yes, '%.d: %.c' should work.
> If not, 'hello.d: hello.c' should not work.
>
> Thanks
> Zoltan Graff
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: RE: MAKE - problem with small/capital letters in filenames
2002-10-31 8:52 RE: MAKE - problem with small/capital letters in filenames Harig, Mark A.
@ 2002-10-31 9:11 ` Igor Pechtchanski
2002-11-04 2:09 ` Graff_Zoltan
0 siblings, 1 reply; 4+ messages in thread
From: Igor Pechtchanski @ 2002-10-31 9:11 UTC (permalink / raw)
To: Graff_Zoltan; +Cc: cygwin
On Thu, 31 Oct 2002, Harig, Mark A. wrote:
> try:
>
> %.D: %.C
>
> or
>
> %.d: %.C
>
> > -----Original Message-----
> > From: Graff_Zoltan [mailto:zotyo@z1.fszek.hu]
> > Sent: Thursday, October 31, 2002 5:24 AM
> > To: Harig, Mark A.
> > Subject: Re: RE: MAKE - problem with small/capital letters in
> > filenames
> >
> > > $ ls makefile hello.c
> > > hello.c makefile
> > Yes, it works if hello.c exists. But not work when HELLO.C exist.
> > My files are on the netware file server, and I see all files with
> > upper case letters under WinXp.
> > Under DOS and Linux the makefile works only with lower case letters.
> >
> > If I change the '%.d: %.c'
> > line to 'hello.d: hello.c' (with lower case letters)
> > it works well.
> >
> > %.c isn't good, but hello.c is?
> > Are the upper and lower case letters equal in file names, or not?
> > If yes, '%.d: %.c' should work.
> > If not, 'hello.d: hello.c' should not work.
> >
> > Thanks
> > Zoltan Graff
Please keep replies on-list. Thanks.
Zoltan,
In the Windows filesystem, there is indeed no difference between lowercase
and uppercase letters in filenames (unless the Posix option is turned on
under NT, but it probably isn't in your case).
Cygwin has an option (in the CYGWIN environment variable) that controls
whether it recognizes wrong-case filenames. The option is
"check_case:<mode>", where <mode> is one of "strict", "relaxed", and
"adjust". You can read up more on this in the User's Guide. From the
information you provided, it seems you have it set to either "relaxed" or
"adjust" (or unset, which defaults to "relaxed", IIRC).
The check_case option, however, will only have effect if you try *opening*
the file. The "%.d" construct in Makefiles performs another action on
filenames, called "globbing". The globbing (same as the shell's "*.d") is
not performed by Cygwin, but rather by the shell (or, in your case, make
itself). Since the Cygwin ports of shells and make use stock Unix code as
their base, there is no provision for globbing files with the wrong case
(unless one was specifically put in, which I doubt). There may be options
to control this, however, of which I'm not aware, so do read the man and
info pages.
This explains why "hello.d" works, but "%.d" doesn't: when the target is
"hello.d", make tries to open (or stat) the file using Cygwin's system
calls, and thus ignores the case (provided check_case is set
appropriately). When the target is "%.d", make tries to glob all
filenames that end in ".d" (not ignoring case), and thus doesn't find your
HELLO.D. You can test this using "ls" in a shell (bash, in this case):
$ export CYGWIN="$CYGWIN check_case:relaxed"
$ ls
hello.c
$ ls Hello.C
Hello.C
$ ls *.C
/bin/ls: *.C: No such file or directory
$
If the options to allow case-insensitive globbing are present, all you
have to do is turn them on (using the MAKEFLAGS environment variable
for make, and the appropriate .*rc file for the shell, IIRC).
If these options are not available, there are still a few ways to fix
this. One is modifying your makefile to include both "%.d" and "%.D" as
targets *every time* you need globbing. Another is keeping files on a
local drive and using either rsync or cvs to synchronize it with the
network drive (you'd have to set up a repository on the network drive for
cvs, of course). And the third way, if you're feeling adventurous, is
fixing the Cygwin ports of your favorite shell and make to allow
case-insensitive globbing, and contributing the patches through this list
to benefit the whole comminity and immortalizing your name in the archives
as the guy who made globbing case-insensitive. :-D
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RE: RE: MAKE - problem with small/capital letters in filenames
2002-10-31 9:11 ` Igor Pechtchanski
@ 2002-11-04 2:09 ` Graff_Zoltan
0 siblings, 0 replies; 4+ messages in thread
From: Graff_Zoltan @ 2002-11-04 2:09 UTC (permalink / raw)
To: cygwin
Hi!
> If the options to allow case-insensitive globbing are present, all you
> have to do is turn them on (using the MAKEFLAGS environment variable
> for make, and the appropriate .*rc file for the shell, IIRC).
I see. I'll try to find this option.
> If these options are not available, there are still a few ways to fix
> this. One is modifying your makefile to include both "%.d" and "%.D" as
> targets *every time* you need globbing.
Doesn't work. HELLO.D generated, but 'no rule ot make target hello.d'.
> Another is keeping files on a
> local drive and using either rsync or cvs to synchronize it with the
> network drive
If nothing else work I'll try this.
Thanks
Zoltan Graff
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: RE: MAKE - problem with small/capital letters in filenames
@ 2002-10-31 9:54 Harig, Mark A.
0 siblings, 0 replies; 4+ messages in thread
From: Harig, Mark A. @ 2002-10-31 9:54 UTC (permalink / raw)
To: cygwin
Eventually, a gratefully accepted patch to the
User's Manual (or FAQ) will be submitted that
includes Igor Pechtchanski's detailed explanation,
and we'll be able to simply point questioners
to it with a URL.
> > Zoltan Graff
>
> Please keep replies on-list. Thanks.
>
> Zoltan,
>
> In the Windows filesystem, there is indeed no difference
> between lowercase
> and uppercase letters in filenames (unless the Posix option
> is turned on
> under NT, but it probably isn't in your case).
>
> Cygwin has an option (in the CYGWIN environment variable)
> that controls
> whether it recognizes wrong-case filenames. The option is
> "check_case:<mode>", where <mode> is one of "strict", "relaxed", and
> "adjust". You can read up more on this in the User's Guide. From the
> information you provided, it seems you have it set to either
> "relaxed" or
> "adjust" (or unset, which defaults to "relaxed", IIRC).
>
> The check_case option, however, will only have effect if you
> try *opening*
> the file. The "%.d" construct in Makefiles performs another action on
> filenames, called "globbing". The globbing (same as the
> shell's "*.d") is
> not performed by Cygwin, but rather by the shell (or, in your
> case, make
> itself). Since the Cygwin ports of shells and make use stock
> Unix code as
> their base, there is no provision for globbing files with the
> wrong case
> (unless one was specifically put in, which I doubt). There
> may be options
> to control this, however, of which I'm not aware, so do read
> the man and
> info pages.
>
> This explains why "hello.d" works, but "%.d" doesn't: when
> the target is
> "hello.d", make tries to open (or stat) the file using Cygwin's system
> calls, and thus ignores the case (provided check_case is set
> appropriately). When the target is "%.d", make tries to glob all
> filenames that end in ".d" (not ignoring case), and thus
> doesn't find your
> HELLO.D. You can test this using "ls" in a shell (bash, in
> this case):
>
> $ export CYGWIN="$CYGWIN check_case:relaxed"
> $ ls
> hello.c
> $ ls Hello.C
> Hello.C
> $ ls *.C
> /bin/ls: *.C: No such file or directory
> $
>
> If the options to allow case-insensitive globbing are present, all you
> have to do is turn them on (using the MAKEFLAGS environment variable
> for make, and the appropriate .*rc file for the shell, IIRC).
>
> If these options are not available, there are still a few ways to fix
> this. One is modifying your makefile to include both "%.d"
> and "%.D" as
> targets *every time* you need globbing. Another is keeping files on a
> local drive and using either rsync or cvs to synchronize it with the
> network drive (you'd have to set up a repository on the
> network drive for
> cvs, of course). And the third way, if you're feeling adventurous, is
> fixing the Cygwin ports of your favorite shell and make to allow
> case-insensitive globbing, and contributing the patches
> through this list
> to benefit the whole comminity and immortalizing your name in
> the archives
> as the guy who made globbing case-insensitive. :-D
> Igor
> --
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-04 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31 8:52 RE: MAKE - problem with small/capital letters in filenames Harig, Mark A.
2002-10-31 9:11 ` Igor Pechtchanski
2002-11-04 2:09 ` Graff_Zoltan
2002-10-31 9:54 Harig, Mark A.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).