Hi Luoyi, I believe make uses sh when it's in the PATH. You're trying to do 'type hello' which is a cmd.exe command, sh doesn't know 'type'. When you rename sh to sh.bak it does use cmd.exe and type succeeds.
You could use external commands to do the work. If you use 'cat hello' it might work in both cases. Internal commands have some advantages though but it's less portable. And cmd.exe's echo is just horrible :-) Also, sh might use a different path if it reads some .profile or .rc files. You might want to check that by displaying the PATH from the makefile. '$(info $(PATH))' could even give a different result than 'echo $(PATH)' I guess, not sure. Does $(info ...) use SHELL and an extra process to display it's info or is it an internal print command that displays make's PATH (from cmd.exe)? Check the manual for the SHELL variable. I explicitly set SHELL to cmd.exe in my makefile to make sure cmd.exe is used. Not sure if it's overruled if you have a sh in your PATH, I'll check that in a minute. But if anyone has a standalone, native, Win32 bash.exe please let me know :-) (Cygwin etc. is not an option in my case.) Good luck! -- Joost -----Original Message----- From: luoyi [mailto:[EMAIL PROTECTED] Sent: donderdag 27 april 2006 7:03 To: [email protected] Subject: make and cygwin issue Hi, after I installed cygwin, I found some strange behavior with make, hope you can help! my cygwin dir is : d:\cygwin *************************************************************************= **** F:\maketest>echo %PATH% D:\Python24;D:\gtktools;D:\gtktools\bin;C:\WINDOWS\system32;C:\WINDOWS;C:= \WINDOWS\System32\Wbem;D:\MinGW\bin;C:\Program Files\Editplus 2;D:\texmf\miktex\bin;d:\ora90\bin;C:\Program=20 Files\Oracle\jre\1.1.8\bin;D:\Ice-2.1.2\bin;E:\LAMP\Apache2 \bin;E:\LAMP\Perl\bin;D:\Program Files\doxygen\bin;D:\Program=20 Files\svn\bin;;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program=20 Files\Vim\vim64;E:\docbook\bin;D:\cygwin\bin F:\maketest>type hello hello, world! F:\maketest>type makefile all: type hello F:\maketest>make type hello process_begin: CreateProcess((null), type hello, ...) failed. make (e=3D2): =CF=B5=CD=B3=D5=D2=B2=BB=B5=BD=D6=B8=B6=A8=B5=C4=CE=C4=BC=FE= =A1=A3 make: *** [all] Error 2 *************************************************************************= **** and after I rename d:\cygwin\bin\sh.exe to sh.exe.bak, then make can do t= he=20 work: *************************************************************************= **** F:\maketest>rename d:\cygwin\bin\sh.exe sh.exe.bak F:\maketest>make type hello hello, world! *************************************************************************= **** can anyone explain it here ? _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
