Subject: bug#11402: Problem while compiling emacs-24.0.96 using MinGW on Win7

From: Eli Zaretskii <[email-masked]>
Date: Fri, 04 May 2012 13:30:15 +0300

> Date: Fri, 4 May 2012 17:37:44 +0800
> From: Du Yanning <[email-masked]>

[Please keep the bug address on the CC list, so that this discussion
is logged by the bug tracker.]

> After I renamed MSYS sh.exe to aaash.exe and ran make, it said:
> 
> F:\build-emacs\emacs-24.0.96\nt>make
> make: /bin/sh: Command not found
> make: /bin/sh: Command not found
> Using /bin/sh as shell.
> mkdir "oo-spd"
> make: /bin/sh: Command not found
> make: [oo-spd] Error 127 (ignored)
> mkdir "oo-spd/i386"
> make: /bin/sh: Command not found
> make: [stamp_BLD] Error 127 (ignored)
> echo oo-spd/i386 > stamp_BLD
> make: /bin/sh: Command not found
> make: *** [stamp_BLD] Error 127
> 
> It seems that make need sh.exe.
> How can I correct it?

My crystal ball says your 'make' is an MSYS 'make'.  If so, install
the MinGW 'make' instead, it can work without sh.exe.  (You will
probably need MinGW or GnuWin32 ports of cp, rm and mv as well, they
are part of the Coreutils package.)

In general, when building Emacs, it is much better to remove MSYS from
Path, because MSYS tools are generally intended to be run only as part
of configuring and building Unix and GNU/Linux packages.  By contrast,
the Windows port of Emacs should be built using native Windows tools.