Switch license to GPLv3 or later.
[bpt/emacs.git] / nt / INSTALL
index 0d2f1b2..a6fe79d 100644 (file)
@@ -1,15 +1,18 @@
                      Building and Installing Emacs
                on Windows NT/2K/XP and Windows 95/98/ME
 
-  Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+  Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
     Free Software Foundation, Inc.
-  See the end of the file for copying permissions.
+  See the end of the file for license conditions.
 
 * For the impatient
 
   Here are the concise instructions for configuring and building the
-  native Win32 binary of Emacs on Windows, for those who want to skip
-  the complex explanations and ``just do it'':
+  native Windows binary of Emacs, for those who want to skip the
+  complex explanations and ``just do it'':
+
+  Do not use this recipe with Cygwin.  For building on Cygwin,
+  use the normal installation instructions, ../INSTALL.
 
   1. Change to the `nt' directory (the directory of this file):
 
        command.com /c configure.bat
 
   3. Run the Make utility suitable for your environment.  If you build
-     with the Microsoft's Visual C compiler:
+     with the Microsoft's Visual C compiler (but see notes about using
+     VC++ 8.0 and later below):
 
        nmake
 
      For the development environments based on GNU GCC (MinGW, MSYS,
-     Cygwin), depending on how Make is called, it could be:
+     Cygwin - but see notes about Cygwin make below), depending on how
+     Make is called, it could be:
 
        make
+     or
+       mingw32-make
      or
        gnumake
      or
        gmake
 
      (If you are building from CVS, say "make bootstrap" or "nmake
-     bootstrap" instead.)
+     bootstrap" instead, and avoid using Cygwin make.)
+
+     With GNU Make, you can use the -j command-line option to have
+     Make execute several commands at once, like this:
+
+       gmake -j 2 XMFLAGS="-j 2"
+
+     The XMFLAGS variable overrides the default behavior of GNU Make
+     on Windows, whereby recursive Make invocations reset the maximum
+     number of simultaneous commands to 1.  The above command allows
+     up to 4 simultaneous commands at once in the top-level Make, and
+     up to 3 in each one of the recursive Make's.
 
   4. Generate the Info manuals (only if you are building out of CVS, and
      if you have makeinfo.exe installed):
 
 * Preliminaries
 
+  If you want to build a Cygwin port of Emacs, use the instructions in
+  the INSTALL file in the main Emacs directory (the parent of this
+  directory).  These instructions are for building a native Windows
+  binary of Emacs.
+
   If you used WinZip to unpack the distribution, we suggest to
   remove the files and unpack again with a different program!
   WinZip is known to create some subtle and hard to debug problems,
 
 * Supported development environments
 
-  To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
-  later and nmake, or a Windows port of GCC 2.95 or later with MinGW
-  and W32 API support and a port of GNU Make.  You can use the Cygwin
-  ports of GCC, but Emacs requires the MinGW headers and libraries to
-  build (latest versions of the Cygwin toolkit, at least since v1.3.3,
-  include the MinGW headers and libraries as an integral part).
+  To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
+  later up to 7.0, and nmake, or a Windows port of GCC 2.95 or later
+  with MinGW and W32 API support and a port of GNU Make.  You can use
+  the Cygwin ports of GCC, but Emacs requires the MinGW headers and
+  libraries to build (latest versions of the Cygwin toolkit, at least
+  since v1.3.3, include the MinGW headers and libraries as an integral
+  part).
+
+  Note that building Emacs with Visual Studio 2005 (VC++ 8.0) is not
+  supported at this time, due to changes introduced by Microsoft into
+  the libraries shipped with the compiler.
 
   The rest of this file assumes you have a working development
   environment.  If you just installed  such an environment, try
   building a trivial C "Hello world" program, and see if it works.  If
-  it doesn't work, resolve that problem first!
+  it doesn't work, resolve that problem first!  If you use Microsoft
+  Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
+  file from the `Bin' subdirectory of the directory where you have
+  installed VS.NET.
 
   If you use the MinGW port of GCC and GNU Make to build Emacs, there
   are some compatibility issues wrt Make and the shell that is run by
   Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
-  or sh.exe., a port of a Unixy shell.  For reference, here is a list
+  or sh.exe., a port of a Unixy shell.  For reference, below is a list
   of which builds of GNU Make are known to work or not, and whether
   they work in the presence and/or absence of sh.exe, the Cygwin port
   of Bash. Note that any version of Make that is compiled with Cygwin
     cygwin compiled gmake 3.77:          fails[1, 5]   fails[2, 5]
     cygwin compiled make 3.78.1:         fails[5]      fails[2, 5]
     cygwin compiled make 3.79.1:         fails[3, 5]   fails[2?, 5]
+    cygwin compiled make 3.80:           okay[6]       fails?[7]
+    cygwin compiled make 3.81:           fails         fails?[7]
     mingw32 compiled make 3.79.1:        okay          okay
-    mingw32 compiled make 3.80:          okay          unknown[6]
-    mingw32 compiled make 3.81:          okay          okay[7]
+    mingw32 compiled make 3.80:          okay          okay[7]
+    mingw32 compiled make 3.81:          okay          okay[8]
 
   Notes:
 
     [4] may fail on Windows 9X and Windows ME; if so, install Bash.
     [5] fails when building leim due to the use of cygwin style paths.
         May work if building emacs without leim.
-    [6] please report if you try this combination.
-    [7] tested only on Windows XP.
+    [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
+       (look for "cygpath" near line 85 of gmake.defs).
+    [7] not recommended; please report if you try this combination.
+    [8] tested only on Windows XP.
 
   Other compilers may work, but specific reports from people that have
   tried suggest that the Intel C compiler (for example) may produce an
 
     http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
 
-  and at this URL:
+  and on these URLs:
 
     http://ourcomments.org/Emacs/w32-build-emacs.html
+    http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
+
+  The second URL above includes instructions for building with MSVC,
+  as well as with MinGW, while the first URL covers only MinGW, but
+  has more details about it.
 
 * Configuring
 
   To configure Emacs to build with GCC or MSVC, whichever is available,
   simply change to the `nt' subdirectory and run `configure.bat' with no
   options.  To see what options are available, run `configure --help'.
+  Do NOT use the --no-debug option to configure.bat unless you are
+  absolutely sure the produced binaries will never need to be run under
+  a debugger.
 
   N.B.  It is normal to see a few error messages output while configure
   is running, when gcc support is being tested.  These cannot be
   Binaries for the image libraries (among many others) can be found at
   the GnuWin32 project.  These are built with MinGW, but they can be
   used with both GCC/MinGW and MSVC builds of Emacs.  See the info on
-  http://ourcomments.org/Emacs/EmacsW32.html for more details about
-  installing image support libraries.
+  http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
+  Images Support", for more details about installing image support
+  libraries.  Note specifically that, due to some packaging snafus in
+  the GnuWin32-supplied image libraries, you will need to download
+  _source_ packages for some of the libraries in order to get the
+  header files necessary for building Emacs with image support.
 
 * Building
 
   The warnings may be fixed in the main FSF source at some point, but
   until then we will just live with them.
 
+  With GNU Make, you can use the -j command-line option to have Make
+  execute several commands at once, like this:
+
+    gmake -j 4 XMFLAGS="-j 3"
+
+  The XMFLAGS variable overrides the default behavior of GNU Make on
+  Windows, whereby recursive Make invocations reset the maximum number
+  of simultaneous commands to 1.  The above command allows up to 4
+  simultaneous commands at once in the top-level Make, and up to 3 in
+  each one of the recursive Make's; you can use other numbers of jobs,
+  if you wish.
+
   If you are building from CVS, the following commands will produce
   the Info manuals (which are not part of the CVS repository):
 
 
   You should be able to debug Emacs using the debugger that is
   appropriate for the compiler you used, namely DevStudio or Windbg if
-  compiled with MSVC, or GDB if compiled with GCC.
+  compiled with MSVC, or GDB if compiled with GCC.  (GDB for Windows
+  is available from the MinGW site, http://www.mingw.org/download.shtml.)
 
   When Emacs aborts due to a fatal internal error, Emacs on Windows
   pops up an Emacs Abort Dialog asking you whether you want to debug
   thread, so this should only be a problem if you've explicitly switched
   threads.
 
-COPYING PERMISSIONS
+\f
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
 
-  Permission is granted to anyone to make or distribute verbatim copies
-  of this document as received, in any medium, provided that the
-  copyright notice and permission notice are preserved,
-  and that the distributor grants the recipient permission
-  for further redistribution as permitted by this notice.
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
-  Permission is granted to distribute modified versions
-  of this document, or of portions of it,
-  under the above conditions, provided also that they
-  carry prominent notices stating who last changed them,
-  and that any new or changed statements about the activities
-  of the Free Software Foundation are approved by the Foundation.
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.