From: Vincent B. <vin...@ho...> - 2012-10-16 20:47:33
|
> Date: Sat, 13 Oct 2012 22:23:52 +0200 > From: el...@gn... > To: min...@li... > Subject: Re: [Mingw-users] mingw32-make with cmd.exe and ECHO. > > > From: Vincent Belaïche <vin...@ho...> > > Date: Sat, 13 Oct 2012 20:43:11 +0200 > > > > What I am meaning is that it seems that something wrong happens when > > mingw32-make passes `ECHO. some message' to cmd.exe. > > What happens is that it doesn't recognize "ECHO.", only "echo." > (lowercase). > > > And also, using MSDOS as the shell is really-really a pain --- I am not > > even sure that MSDOS deserves to be call a "Shell". > > It's not MSDOS, it's the Windows shell cmd.exe. And it is almost as > powerful as the Unixy shell these days. It's just that it has a > different syntax. What problems did you have? > > [...] Well, I must say that I am not yet in cmd.exe specific issues, but still struggling with make using cmd.exe in a strange way. For instance here is a make file: ----------------------------------------------------------------------- all: ECHO salut > titi.txt DEL /Q titi.txt ----------------------------------------------------------------------- here is my path: ----------------------------------------------------------------------- > path PATH=c:\msys\1.0\mingw\bin;c:\Programme\GNU\Emacs\bin;c:\msys\1.0\gnuwin32\bin;c:\WINDOWS;c:\WINDOWS\System32 ----------------------------------------------------------------------- If I type the command by hand, everything goes perfect: ----------------------------------------------------------------------- > ECHO salut > titi.txt > DEL /Q titi.txt ----------------------------------------------------------------------- But if I lauch the makefile here is what happens: ----------------------------------------------------------------------- > mingw32-make ECHO salut > titi.txt DEL /Q titi.txt process_begin: CreateProcess(NULL, DEL /Q titi.txt, ...) failed. make (e=2): Le fichier spÚcifiÚ est introuvable. mingw32-make: *** [all] Error 2 ----------------------------------------------------------------------- It seems that for some stange reason mingw32-make thinks that `DEL /Q titi.txt' is a file name of its own that is a command. Now if I modify the makefile as follows: ----------------------------------------------------------------------- all: ECHO salut > titi.txt DEL /Q "titi.txt" ----------------------------------------------------------------------- It will work, great ! So my question is the following: why on earth does Mingw32-make thinks that `DEL ' is a directory containing a file named `Q titi.txt'. The file separator in Windows is not `/' but `\'. It seems that mingw32-make plays with changing / to \ just before passing `DEL /Q titi.txt' to cmd.exe VBR, Vincent. |