Query about how to get 'full' Cygwin/unix support

2012-03-28 Thread AngusC

Hello

I am using cygwin and have copied the core cygwin files to a folder called
binarytools on my Windows PC.  This folder is first item in path env
variable.

When I run make it has commands to do a mkdir -p foldername

But mkdir -p myfolder creates a folder called -p and also a folder called
myfolder???

Why the strange behaviour?  How would I get the standard unix behaviour?

Angus
-- 
View this message in context: 
http://old.nabble.com/Query-about-how-to-get-%27full%27-Cygwin-unix-support-tp33544853p33544853.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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



Re: Query about how to get 'full' Cygwin/unix support

2012-03-28 Thread Eric Blake
On 03/28/2012 02:07 PM, AngusC wrote:
 
 Hello
 
 I am using cygwin and have copied the core cygwin files to a folder called
 binarytools on my Windows PC.  This folder is first item in path env
 variable.
 
 When I run make it has commands to do a mkdir -p foldername
 
 But mkdir -p myfolder creates a folder called -p and also a folder called
 myfolder???
 
 Why the strange behaviour?  How would I get the standard unix behaviour?

Probably because you used cmd's builtin 'mkdir' (which doesn't
understand -p) rather than actually invoking /bin/mkdir (of course,
since you are running in cmd, that would be spelled
c:\path\to\cygwin\bin\mkdir).

Why are you using cmd in the first place?  Cygwin also provides 'bash'
as a shell, and bash doesn't have a broken builtin mkdir like cmd does.

-- 
Eric Blake   ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: Query about how to get 'full' Cygwin/unix support

2012-03-28 Thread Jeremy Bopp
On 03/28/2012 03:07 PM, AngusC wrote:
 
 Hello
 
 I am using cygwin and have copied the core cygwin files to a folder called
 binarytools on my Windows PC.  This folder is first item in path env
 variable.
 
 When I run make it has commands to do a mkdir -p foldername
 
 But mkdir -p myfolder creates a folder called -p and also a folder called
 myfolder???
 
 Why the strange behaviour?  How would I get the standard unix behaviour?

I believe that mkdir is a builtin function of the cmd shell which you
are probably using.  If I'm right, then that function will supersede
anything in the PATH.  That means that you're not using Cygwin's mkdir
program in your command which should explain the behavior you see.

To work around this, you can either run your commands from within a bash
shell rather than cmd or you can explicitly call the program using its
absolute path, such as C:\binarytools\bin\mkdir.exe.  Maybe just calling
mkdir.exe would also work.

-Jeremy

--
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