delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/01/22:59:07

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <896908DA55C4D311B9C000C04F01A05410A6E2@ENTERPRISE>
From: Harold Hunt <Harold AT compasstechnologies DOT com>
To: "Cygx (E-mail)" <cygwin-xfree AT sources DOT redhat DOT com>,
"'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Subject: bash [ -f filename ] behavior
Date: Sun, 1 Oct 2000 22:54:28 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

When building XFree86 from CVS under Cygwin you may encounter a problem
where 'make World' reports that a file 'imake' cannot be moved because it
does not exist.

I have looked into this problem extensively, and it is due to bash behaving
differently under Cygwin than it does under Linux.  However, I believe it
deserves to at least be brought to light.

Make a bash script file containing the following line:
if [ -f imake ]; then mv imake imake.foo; fi

Follow these steps under Cygwin's Bash:

Run the script in a directory with no files named imake or imake.exe.  The
script will detect that imake does not exist, so it will not attempt to move
the file.

Run 'touch imake', then run the script again.  The script will move file
imake to imake.foo, as it should.

Run 'touch imake.exe', then run the script again.  The script will think
that a file named 'imake' exists, even though it doesn't; the script will
then attempt to move file 'imake', which does not exist, and the script will
fail.

Now, run the same steps under Linux's Bash, and you'll notice that the
script does not get confused when a file named 'imake.exe' exists.

This bug, or feature (as it may help compatibility), currently causes
XFree86 to fail when building under Cygwin.  I'm going to send in a patch to
XFree86 to check for 'imake.exe' before checking for 'imake'; that will fix
the build bustage for now.  But, I figure the Cygwin guys might want to
evaluate whether this is really desired behavior...

(I'm not on the Cygwin list, just the Cygwin/XFree86 list, so Cygwin people
please CC me.  Thanks.)

Harold 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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