Subject: RE: bug#10665: 24.0.93; Building for MS Windows using MinGW encounters a build problem in ../emacs-24.0.93/src/makefile

From: "Gallagher, Kevin" <[email-masked]>
Date: Mon, 30 Jan 2012 19:12:27 -0600

Here's the version of MSYS bash that I find to be excellent.

  GNU bash, version 3.1.17(1)-release (i686-pc-msys)
  Copyright (C) 2005 Free Software Foundation, Inc.

As for a command in a rule which does nothing, this works:

 globals.h: gl-stamp
	@echo

OK, technically it outputs a linefeed to stdout, but that is harmless in this context and requires less overhead than the original. (Both bash and cmd.exe have an echo command and both recognize the "@" syntax at the start of a command.)

In the original syntax:

   globals.h: gl-stamp
         @cmd /c rem true

make passes the command line to a sub-shell in which the invocation of cmd creates a second nested sub-shell where the line "rem true" is interpreted as a batch file "remark" command.

Here's some additional information for nt/INSTALL.

1. When building on Windows XP, the option "-fno-omit-frame-pointer" must be used.  Otherwise, entering a C-g will cause Emacs to crash.  NOTE:  It turns out that this is not necessary when building on Windows 7.  (I don't have any information about other versions of Windows.)

2. When building in MSYS bash, the following syntax for invoking the configure script must be used:

  cmd /c "configure.bat --cflags -fno-omit-frame-pointer"

      or

  cmd /c "configure.bat --cflags -IC:/extras/include --cflags -fno-omit-frame-pointer"

In other words, configure.bat MUST be included within the double quotes.

3. Whether building in the bash shell or the cmd.exe shell, when using the MinGW tool set, all -I options passed to configure.bat must use the "drive-letter:" syntax with FORWARD slashes in the path!