This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make and shell calls


Can you please give some more detail, especially the version of make and the
CygWin-DLL. Interesting also is your setting of "MAKE_MODE", resp. the
startup options for calling make.
Make has not really been designed for working with directories as targets.
You'd better insert sth like this:
  $(shell if [ -e <dir> ]; then mkdir -p <dir>; fi) /* Syntax not checked */
If you'd prefer, you might try with /cygdrive/d/sbroot/bin instead of using
the DOS colon-notation; the error looks like a file handling problem, where
the used shell cannot correctly interpret the filename given to it. If you
need the backslash-notation for the shell (CMD.EXE under NT), try escaping
the backslashes, so make will let them go unmolested (d:\\sbroot\\bin,
sometimes even quadruple backslashes do the trick, if you have an extra
redirection running like: make starting a shell, the shell starting a
command).
If all that doesn't help, make sure you're using the make you think you're
using, pack a 'cygcheck -s' onto a message, and describe exactly what your
doing.
Also note my inline comments below.

Wendy Vanhonacker wrote:
> 
> Hi,
> I'm using cygwin on NT to run some makefiles, and I have a problem with a
> shell command line.
> I'm calling the makefile from the DOS.
> Here what I get:
> 
> with:
> d:/sbroot/bin :
>       mkdir d:/sbroot/bin
> 
> I get the error:
> 
> mkdir d:/sbroot/bin
>  175510 [main] make 786 proc_subproc: Couldn't duplicate my handle<0x10C>
> for pid 2283400, Win32 error 6
> Invalid switch - /bin
> 
> I don't know what shell it is using, but when I try directly on DOS with sh
> I have the same thing , but when I do it on the cygwin window  it works!

What is the difference between 'calling the makefile from the DOS' and
'directly on DOS with sh', resp. what do you mean with 'on DOS with sh'?
Please do a "make --version" in both environments, and post the results.

> I don't know if I should need '/' or '\'.
> I guess it's a porblem of transfer between cygwin and MSDOS. (I did all the
> environment variables changes..).

Normally you don't need to do anything about the environment. What exactly
_did_ you do?

> 
> If I do it with backward slash I get the error:
> d:\sbroot\bin :
>       mkdir d:\sbroot\bin

In this case, don't expect backslashes to remain in the target string. Use
\\ instead, as described further above.

> 
> Error:
> mkdir d:\sbroot\bin
> Extended Error 183
> 
>    3039 [main] make 949 proc_subproc: Couldn't duplicate my handle<0x10C>
> for pid 0, Win32 error 6
> make[1]: mkdir: Command not found
> make[1]: *** [d:\sbroot\bin] Error 127
> 
> Where is the problem.
> What do you do with '\' and '/'? Should I put forward slash everywhere
> since it's a UNIX window?
> 
> The invalid switch error usually comes when you use MSDOS syntax instead or
> unix or reverse...

The invalid switch message is a misinterpretation, probably seeing "d" as a
target (because of the colon).

HTH,

Johan Bezem
CSK Software AG

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]