Building and Installing Emacs
on Windows NT/2K/XP and Windows 95/98/ME
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
See the end of the file for license conditions.
or
gmake
- (If you are building from CVS, say "make bootstrap" or "nmake
+ (If you are building from Bazaar, say "make bootstrap" or "nmake
bootstrap" instead, and avoid using Cygwin make.)
With GNU Make, you can use the -j command-line option to have
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):
+ 4. Generate the Info manuals (only if you are building out of Bazaar,
+ and if you have makeinfo.exe installed):
make info
directories, etc. We suggest to use djtarnt.exe from the GNU FTP
site.
- If you are building out of CVS, then some files in this directory
- (.bat files, nmake.defs and makefile.w32-in) may need the line-ends
- fixing first. The easiest way to do this and avoid future conflicts
- is to run the following command in this (emacs/nt) directory:
-
- cvs update -kb
-
- Alternatively, use programs that convert end-of-line format, such as
- dos2unix and unix2dos available from GnuWin32 or dtou and utod from
- the DJGPP project.
-
- Additionally, the files lisp/international/uni-*.el and
- lisp/ldefs-boot.el need Unix line ends due to some embedded ^M
- characters that are not at the end of the line. So in the
- lisp/international directory you should run the following command, or
- use dos2unix on those files.
-
- cvs update -kb uni-*.el
-
- and in the lisp directory, use the command:
-
- cvs update -kb lisp/ldefs-boot.el
-
- In addition to this file, you should also read INSTALL.CVS in the
+ In addition to this file, you should also read INSTALL.BZR in the
parent directory, and make sure that you have a version of
"touch.exe" in your path, and that it will create files that do not
yet exist.
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, below 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
- will only work with Cygwin tools, due to the use of cygwin style
+ of Bash. Note that any version of Make that is compiled with Cygwin
+ will only work with Cygwin tools, due to the use of Cygwin style
paths. This means Cygwin Make is unsuitable for building parts of
Emacs that need to invoke Emacs itself (leim and "make bootstrap",
for example). Also see the Trouble-shooting section below if you
decide to go ahead and use Cygwin make.
- In addition, using 4NT as your shell is known to fail the build process,
- at least for 4NT version 3.01. Use CMD.EXE, the default Windows shell,
- instead. MSYS sh.exe also appears to cause various problems. If you have
- MSYS installed, try "make SHELL=cmd.exe" to force the use of cmd.exe
- instead of sh.exe.
+ In addition, using 4NT or TCC as your shell is known to fail the build
+ process, at least since 4NT version 3.01. Use CMD.EXE, the default
+ Windows shell, instead. MSYS sh.exe also appears to cause various
+ problems. If you have MSYS installed, try "make SHELL=cmd.exe" to
+ force the use of cmd.exe instead of sh.exe.
sh exists no sh
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.
+ Both of those pages were written before Emacs switched from CVS to
+ Bazaar, but the parts about building Emacs still apply in Bazaar.
+ The second URL has instructions for building with MSVC, as well as
+ with MinGW, while the first URL covers only MinGW, but has more
+ details about it.
* Configuring
* Optional image library support
In addition to its "native" image formats (pbm and xbm), Emacs can
- handle other image types: xpm, tiff, gif, png and jpeg (postscript is
- currently unsupported on Windows). To build Emacs with support for
- them, the corresponding headers must be in the include path when the
- configure script is run. This can be setup using environment
- variables, or by specifying --cflags -I... options on the command-line
- to configure.bat. The configure script will report whether it was
- able to detect the headers. If the results of this testing appear to be
- incorrect, please look for details in the file config.log: it will show
- the failed test programs and compiler error messages that should explain
- what is wrong. (Usually, any such failures happen because some headers
- are missing due to bad packaging of the image support libraries.)
+ handle other image types: xpm, tiff, gif, png, jpeg and experimental
+ support for svg.
+
+ To build Emacs with support for them, the corresponding headers must
+ be in the include path when the configure script is run. This can
+ be setup using environment variables, or by specifying --cflags
+ -I... options on the command-line to configure.bat. The configure
+ script will report whether it was able to detect the headers. If
+ the results of this testing appear to be incorrect, please look for
+ details in the file config.log: it will show the failed test
+ programs and compiler error messages that should explain what is
+ wrong. (Usually, any such failures happen because some headers are
+ missing due to bad packaging of the image support libraries.)
To use the external image support, the DLLs implementing the
functionality must be found when Emacs first needs them, either on the
If GTK 2.0 is installed, addpm will arrange for its image libraries
to be on the DLL search path for Emacs.
+* Experimental SVG support
+
+ SVG support is currently experimental, and not built by default.
+ Specify --with-svg and ensure you have all the dependencies in your
+ include path. Unless you have built a minimalist librsvg yourself
+ (untested), librsvg depends on a significant chunk of GTK+ to build,
+ plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
+ easiest way to obtain the dependencies required for building is to
+ download a pre-bundled GTK+ development environment for Windows.
+ GTK puts its header files all over the place, so you will need to
+ run pkgconfig to list the include path you will need (either passed
+ to configure.bat as --cflags options, or set in the environment).
+
+ To use librsvg at runtime, ensure that librsvg and its dependencies
+ are on your PATH. If you didn't build librsvg yourself, you will
+ need to check with where you downloaded it from for the
+ dependencies, as there are different build options. If it is a
+ short list, then it most likely only lists the immediate
+ dependencies of librsvg, but the dependencies themselves have
+ dependencies - so don't download individual libraries from GTK+,
+ download and install the whole thing. If you think you've got all
+ the dependencies and SVG support is still not working, check your
+ PATH for other libraries that shadow the ones you downloaded.
+ Libraries of the same name from different sources may not be
+ compatible, this problem was encountered with libbzip2 from GnuWin32
+ with libcroco from gnome.org.
+
+ If you can see etc/images/splash.svg, then you have managed to get
+ SVG support working. Congratulations for making it through DLL hell
+ to this point. You'll probably find that some SVG images crash
+ Emacs. Problems have been observed in some images that contain
+ text, they seem to be a problem in the Windows port of Pango, or
+ maybe a problem with the way Cairo or librsvg is using it that
+ doesn't show up on other platforms.
+
* Building
After running configure, simply run the appropriate `make' program for
your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
- GNU make. (If you are building out of CVS, say "make bootstrap" or
+ GNU make. (If you are building out of Bazaar, say "make bootstrap" or
"nmake bootstrap" instead.)
As the files are compiled, you will see some warning messages
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):
+ If you are building from Bazaar, the following commands will produce
+ the Info manuals (which are not part of the Bazaar sources):
make info
or
* Make targets
The following make targets may be used by users building the source
- distribution, or users who have checked out of CVS after
+ distribution, or users who have checked out of Bazaar after
an initial bootstrapping.
make
make distclean
In addition to the files removed by make clean, this also removes
Makefiles and other generated files to get back to the state of a
- freshly unpacked source distribution. Note that this will not remove
+ freshly unpacked source distribution. Note that this will not remove
installed files, or the results of builds performed with different
compiler or optimization options than the current configuration.
After make distclean, it is necessary to run configure.bat followed
the files removed by make cleanall.
- The following targets are intended only for users who have checked out
- of CVS.
+ The following targets are intended only for use with the Bazaar sources.
make bootstrap
Creates a temporary emacs binary with lisp source files and
emacs is redumped with the compiled lisp.
make recompile
- Recompiles any changed lisp files after a cvs update. This saves
+ Recompiles any changed lisp files after an update. This saves
doing a full bootstrap after every update. If this or a subsequent
make fail, you probably need to perform a full bootstrap, though
running this target multiple times may eventually sort out the
make maintainer-clean
Removes everything that can be recreated, including compiled lisp
- files, to get back to the state of a fresh CVS checkout. After make
+ files, to get back to the state of a fresh Bazaar tree. After make
maintainer-clean, it is necessary to run configure.bat and make
bootstrap to rebuild. Occasionally it may be necessary to run this
- target after a cvs update.
+ target after an update.
* Trouble-shooting
\f
This file is part of GNU Emacs.
-GNU Emacs is free software; you can redistribute it and/or modify
+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.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
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.
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.