Subject: bug#12955: 24.3.50; Build process on MS-Windows: sometimes needs "human intervention"

From: Eli Zaretskii <[email-masked]>
Date: Thu, 22 Nov 2012 05:41:27 +0200

> Date: Wed, 21 Nov 2012 21:49:53 +0100
> From: Dani Moncayo <[email-masked]>
> 
> Sometimes, when building the trunk on MS-Windows, the make process get
> stuck when this like of `src/makefile' is executed:
> 
>   cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h"
> 
> What happens is that a new cmd.exe session is open and waiting for
> input, when the expected behavior for that session is to execute the
> command between double quotes and exit.  So I have to copy&paste the
> command, execute it and exit the cmd session so that the build process
> can continue.
> 
> This problem is known to Eli, Juanma and those who build Emacs on
> Windows, and is related to MSYS and the translation it performs with
> filesystem paths ("/c" is translated to "c:\" for example).
> 
> If you have MSYS installed in your system, it is easy to reproduce the problem:
> 1. Open a cmd.exe console.
> 2. Run: sh  (to start a bash session).
> 3. Run: cmd /c "dir".
> 
> --> A new cmd session is created, it is waiting for input and the
> "dir" command has not been executed.
> 
> Fortunately, I just found a solution for this: just remove the space
> between the `/c' and the double quote:
> 3. Run: cmd /c"dir".
> 
> --> This time the cmd session executes the "dir" command and then
> ends, returning control to the bash session.

Sorry, I don't want to do this.  This might work now, but it does so
by pure luck, and might break in some future version of cmd, because
there _should_ be a space between /c and the command that follows.

The solution to this is simple: don't involve MSYS in building the
native port of Emacs.  It boils down to removing MSYS from PATH in the
shell window where you run the build scripts.