Commit df065a0b authored by Eli Zaretskii's avatar Eli Zaretskii

Support building Emacs on MS-Windows using the Posix configury.

 lib/Makefile.am: If building for MS-Windows, include
 nt/gnulib.mk instead of lib/gnulib.mk.
 configure.ac: Adapt to MSYS build on MS-Windows.
 Makefile.in (NTDIR): New variable, for the MSYS build on
 MS-Windows.
 (SUBDIR): Add $(NTDIR).
 (.PHONY): Add epaths-force-w32.
 (msys_to_w32): New variable.
 (epaths-force-w32, install-nt, uninstall-nt): New targets.
 (lib-src src): Add $(NTLIB) to prerequisites.
 (lib lib-src lisp leim nt): Add 'nt'.
 (config.status): Use $(CFG).
 (.PHONY): Add install-$(NTDIR) and uninstall-$(NTDIR).
 (install, install-arch-dep): Add install-$(NTDIR).
 (uninstall): Depend on uninstall-$(NTDIR).
 (mostlyclean, clean, distclean, bootstrap-clean): Add 'nt'.
 * GNUmakefile (CFG): New variable, uses mingw-cfg.site as
 CONFIG_SITE for the MSYS build on MS-Windows.
 (Makefile): Use $(CFG).
 .bzrignore: Ignore *.res, *.tmp, and *.map.  Remove
 src/emacs.res.

 etc/NEWS: Advertise the MSYS build on MS-Windows.

 leim/Makefile.in (leim-list.el, check-declare): Use reveal-filename.

 lib-src/update-game-score.c [WINDOWSNT]: Include "ntlib.h".
 lib-src/ntlib.h (sleep): Update prototype.
 (geteuid): Add prototype.
 lib-src/ntlib.c (sleep): Now returns an unsigned value.
 (getgid): New function.
 lib-src/Makefile.in (CLIENTW, LIB_WSOCK32, LIBS_ECLIENT, NTLIB)
 (CLIENTRES, WINDRES, NTINC, NTDEPS): New variables.
 (INSTALLABLES): Add $(CLIENTW).
 (LIBS_MOVE): Use $(LIB_WSOCK32).
 ($(DESTDIR)${archlibdir}): Use $(EXEEXT) on update-game-score.
 (test-distrib${EXEEXT}): Use $(EXEEXT) on test-distrib.
 (etags${EXEEXT}, ebrowse${EXEEXT}, ctags${EXEEXT})
 (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
 (emacsclient${EXEEXT}, hexl${EXEEXT}, update-game-score${EXEEXT}):
 Add $(NTLIB) to prerequisites.  Use $(EXEEXT).
 (pop.o): Add pop.h to prerequisites.
 (emacsclientw${EXEEXT}, ntlib.o): New targets.
 (emacsclient.res): New target.

 lisp/subr.el (reveal-filename): New function.
 lisp/loadup.el: Compute Emacs executable versions on MS-Windows,
 where executables have the .exe extension.  Add a hard link
 emacs-XX.YY.ZZ.exe on MS-Windows.
 lisp/Makefile.in (XARGS_LIMIT): New variable.
 (custom-deps, finder-data, autoloads)
 ($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el)
 ($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el)
 ($(CAL_DIR)/hol-loaddefs.el): Use reveal-filename.
 (compile-main): Limit xargs according to $(XARGS_LIMIT).

 nt/msysconfig.sh: New file.
 nt/mingw-cfg.site: New file.
 nt/makefile.w32-in (LOCAL_FLAGS): Add -DOLD_PATHS=1.
 nt/inc/unistd.h: Include pwd.h and sys/types.h.
 nt/inc/sys/time.h (_TIMEVAL_DEFINED, timerisset, timercmp)
 (timerclear): Define.
 (gettimeofday): Adjust signature to be Posix compatible, by using
 the 'restrict' keyword.
 nt/inc/sys/stat.h (UTIME_NOW, UTIME_OMIT): Define.
 (struct _stat, struct _stati64): Define.
 nt/inc/sys/socket.h (timeval): Define only for MSVC.
 (FD_SET, FD_CLR, FD_ISSET, fd_set): Redefine only if
 EMACS_CONFIG_H is defined.
 (timeval): Undefine only for MSVC.
 nt/inc/ms-w32.h (HAVE___BUILTIN_UNWIND_INIT, restrict)
 (HAVE_WINDOW_SYSTEM, HAVE_MENUS, EMACS_CONFIGURATION)
 (EMACS_CONFIG_OPTIONS, HAVE_LONG_LONG_INT)
 (HAVE_UNSIGNED_LONG_LONG_INT): Define only if not already defined.
 (fileno): Move definition after including stdio.h.
 (sigset_t): Guard typedef by _W64.
 nt/gnulib.mk: New file.
 nt/epaths.nt: New file.
 nt/addpm.c [!OLD_PATHS]: Include src/epaths.h, instead of having a
 copy of the file names there.
 <env_vars> [!OLD_PATHS]: Use macros from epaths.h instead of
 literal strings.
 nt/Makefile.in: New file.
 nt/INSTALL.MSYS: New file.
 nt/INSTALL: Mention INSTALL.MSYS.

 src/w32.c: Include epaths.h.
 (init_environment): Use cmdproxy.exe without leading directories.
 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
 case.
 (gettimeofday): Adjust signature and return value to Posix
 expectations.
 src/unexw32.c (open_output_file): Delete the existing emacs.exe
 before creating it, to break the hard link to the versioned
 executable.
 src/Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
 (FIRSTFILE_OBJ): New variables.
 (W32_RES): Rename to EMACSRES.  All users changed.
 (base_obj): Use $(CM_OBJ).
 (ALLOBJS): Use $(FIRSTFILE_OBJ).
 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
 $(W32_RES_LINK) before $(LIBES).
 (emacs.res): Depend on $(EMACS_MANIFEST).  Put emacs.rc in nt.
parents dcfda130 f1e496a5
2013-05-16 Eli Zaretskii <eliz@gnu.org>
* lib/Makefile.am: If building for MS-Windows, include
nt/gnulib.mk instead of lib/gnulib.mk.
* configure.ac: Adapt to MSYS build on MS-Windows.
* Makefile.in (NTDIR): New variable, for the MSYS build on
MS-Windows.
(SUBDIR): Add $(NTDIR).
(.PHONY): Add epaths-force-w32.
(msys_to_w32): New variable.
(epaths-force-w32, install-nt, uninstall-nt): New targets.
(lib-src src): Add $(NTLIB) to prerequisites.
(lib lib-src lisp leim nt): Add 'nt'.
(config.status): Use $(CFG).
(.PHONY): Add install-$(NTDIR) and uninstall-$(NTDIR).
(install, install-arch-dep): Add install-$(NTDIR).
(uninstall): Depend on uninstall-$(NTDIR).
(mostlyclean, clean, distclean, bootstrap-clean): Add 'nt'.
* GNUmakefile (CFG): New variable, uses mingw-cfg.site as
CONFIG_SITE for the MSYS build on MS-Windows.
(Makefile): Use $(CFG).
* .bzrignore: Ignore *.res, *.tmp, and *.map. Remove
src/emacs.res.
2013-05-16 Paul Eggert <eggert@cs.ucla.edu> 2013-05-16 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating: Merge from gnulib, incorporating:
......
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
# run "configure" by hand. But run autogen.sh first, if the source # run "configure" by hand. But run autogen.sh first, if the source
# was checked out directly from the repository. # was checked out directly from the repository.
ifneq ($(MSYSTEM),)
CFG = CONFIG_SITE=$(CURDIR)/nt/mingw-cfg.site
else
CFG =
endif
# If a Makefile already exists, just use it. # If a Makefile already exists, just use it.
...@@ -70,7 +75,7 @@ configure: ...@@ -70,7 +75,7 @@ configure:
Makefile: configure Makefile: configure
@echo >&2 'There seems to be no Makefile in this directory.' @echo >&2 'There seems to be no Makefile in this directory.'
@echo >&2 'Running ./configure ...' @echo >&2 'Running ./configure ...'
./configure $(CFG) ./configure
@echo >&2 'Makefile built.' @echo >&2 'Makefile built.'
endif endif
......
...@@ -93,6 +93,9 @@ version=@version@ ...@@ -93,6 +93,9 @@ version=@version@
### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
configuration=@configuration@ configuration=@configuration@
### The nt/ subdirectory gets built only for MinGW
NTDIR=@NTDIR@
# ==================== Where To Install Things ==================== # ==================== Where To Install Things ====================
# Location to install Emacs.app under GNUstep / Mac OS X. # Location to install Emacs.app under GNUstep / Mac OS X.
...@@ -272,23 +275,23 @@ EMACS = ${EMACS_NAME}${EXEEXT} ...@@ -272,23 +275,23 @@ EMACS = ${EMACS_NAME}${EXEEXT}
EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT} EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT}
# Subdirectories to make recursively. # Subdirectories to make recursively.
SUBDIR = lib lib-src src lisp leim SUBDIR = $(NTDIR) lib lib-src src lisp leim
# The subdir makefiles created by config.status. # The subdir makefiles created by config.status.
SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@ SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@
SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'` SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'`
# Subdirectories to install, and where they'll go. # Subdirectories to install, and where they'll go. lib-src's and nt's
# lib-src's makefile knows how to install it, so we don't do that here. # makefiles know how to install them, so we don't do that here.
# Directories that cannot simply be copied, eg info, # Directories that cannot simply be copied, eg info, are treated
# are treated separately. # separately. quail appears twice because in out-of-tree builds, it
# quail appears twice because in out-of-tree builds, it exists twice. # exists twice.
COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/leim/ja-dic ${srcdir}/leim/quail leim/quail COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/leim/ja-dic ${srcdir}/leim/quail leim/quail
COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}/ja-dic $(DESTDIR)${leimdir}/quail $(DESTDIR)${leimdir}/quail COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}/ja-dic $(DESTDIR)${leimdir}/quail $(DESTDIR)${leimdir}/quail
all: ${SUBDIR} all: ${SUBDIR}
.PHONY: all ${SUBDIR} blessmail epaths-force FRC .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 FRC
removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g' removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
...@@ -315,7 +318,20 @@ epaths-force: FRC ...@@ -315,7 +318,20 @@ epaths-force: FRC
-e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \ -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
lib-src src: lib # Convert MSYS-style /x/foo file name into x:/foo that Windows can grok.
msys_to_w32=sed -e 's,^/\([A-Za-z]\)/,\1:/,'
# The w32 build needs a slightly different editing, and it uses
# nt/epaths.nt as the template.
epaths-force-w32: FRC
@(w32srcdir=`echo "${srcdir}" | ${msys_to_w32}` ; \
sed < ${srcdir}/nt/epaths.nt > epaths.h.$$$$ \
-e '/^.*#/s/@VER@/${version}/g' \
-e '/^.*#/s/@CFG@/${configuration}/g' \
-e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
lib-src src: $(NTDIR) lib
src: lib-src FRC src: lib-src FRC
...@@ -324,7 +340,7 @@ src: lib-src FRC ...@@ -324,7 +340,7 @@ src: lib-src FRC
lisp leim: src lisp leim: src
# These targets should be "${SUBDIR} without `src'". # These targets should be "${SUBDIR} without `src'".
lib lib-src lisp leim: Makefile FRC lib lib-src lisp leim nt: Makefile FRC
cd $@ && $(MAKE) all $(MFLAGS) \ cd $@ && $(MAKE) all $(MFLAGS) \
CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
...@@ -378,9 +394,9 @@ $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ ...@@ -378,9 +394,9 @@ $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \
config.status: ${srcdir}/configure ${srcdir}/lisp/version.el config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
if [ -x ./config.status ]; then \ if [ -x ./config.status ]; then \
./config.status --recheck; \ $(CFG) ./config.status --recheck; \
else \ else \
$(srcdir)/configure $(CONFIGURE_FLAGS); \ $(CFG) $(srcdir)/configure $(CONFIGURE_FLAGS); \
fi fi
AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4 AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
...@@ -417,13 +433,14 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS) ...@@ -417,13 +433,14 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
# ==================== Installation ==================== # ==================== Installation ====================
.PHONY: install install-arch-dep install-arch-indep install-doc install-info .PHONY: install install-arch-dep install-arch-indep install-doc install-info
.PHONY: install-man install-etc install-strip uninstall .PHONY: install-man install-etc install-strip install-$(NTDIR)
.PHONY: uninstall uninstall-$(NTDIR)
## If we let lib-src do its own installation, that means we ## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in ## don't have to duplicate the list of utilities to install in
## this Makefile as well. ## this Makefile as well.
install: all install-arch-indep install-doc install-arch-dep blessmail install: all install-arch-indep install-doc install-arch-dep install-$(NTDIR) blessmail
@true @true
## Ensure that $subdir contains a subdirs.el file. ## Ensure that $subdir contains a subdirs.el file.
...@@ -444,7 +461,7 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \ ...@@ -444,7 +461,7 @@ write_subdir=if [ -f $${subdir}/subdirs.el ]; \
### Install the executables that were compiled specifically for this machine. ### Install the executables that were compiled specifically for this machine.
### We do install-arch-indep first because the executable needs the ### We do install-arch-indep first because the executable needs the
### Lisp files and DOC file to work properly. ### Lisp files and DOC file to work properly.
install-arch-dep: src install-arch-indep install-doc install-arch-dep: src install-arch-indep install-doc install-$(NTDIR)
umask 022; ${MKDIR_P} $(DESTDIR)${bindir} umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
cd lib-src && \ cd lib-src && \
$(MAKE) install $(MFLAGS) prefix=${prefix} \ $(MAKE) install $(MFLAGS) prefix=${prefix} \
...@@ -464,6 +481,16 @@ install-arch-dep: src install-arch-indep install-doc ...@@ -464,6 +481,16 @@ install-arch-dep: src install-arch-indep install-doc
rm -rf ${ns_appresdir}/share; \ rm -rf ${ns_appresdir}/share; \
fi fi
### Windows-specific install target for installing programs produced
### in nt/, and its Posix do-nothing shadow.
install-:
install-nt:
cd $(NTDIR) && \
$(MAKE) install $(MFLAGS) prefix=${prefix} \
exec_prefix=${exec_prefix} bindir=${bindir} \
libexecdir=${libexecdir} archlibdir=${archlibdir} \
INSTALL_STRIP=${INSTALL_STRIP}
## In the share directory, we are deleting: ## In the share directory, we are deleting:
## applications (with emacs.desktop, also found in etc/) ## applications (with emacs.desktop, also found in etc/)
## emacs (basically empty except for unneeded site-lisp directories) ## emacs (basically empty except for unneeded site-lisp directories)
...@@ -678,11 +705,12 @@ install-strip: ...@@ -678,11 +705,12 @@ install-strip:
### create (but not the noninstalled files such as `make all' would create). ### create (but not the noninstalled files such as `make all' would create).
### ###
### Don't delete the lisp and etc directories if they're in the source tree. ### Don't delete the lisp and etc directories if they're in the source tree.
uninstall: uninstall: uninstall-$(NTDIR)
cd lib-src && \ cd lib-src && \
$(MAKE) $(MFLAGS) uninstall \ $(MAKE) $(MFLAGS) uninstall \
prefix=${prefix} exec_prefix=${exec_prefix} \ prefix=${prefix} exec_prefix=${exec_prefix} \
bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir} bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}
-unset CDPATH; \ -unset CDPATH; \
for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \ for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
if [ -d $${dir} ]; then \ if [ -d $${dir} ]; then \
...@@ -727,6 +755,15 @@ uninstall: ...@@ -727,6 +755,15 @@ uninstall:
[ -s $${file} ] || rm -f $$file; \ [ -s $${file} ] || rm -f $$file; \
done done
### Windows-specific uninstall target for removing programs produced
### in nt/, and its Posix do-nothing shadow.
uninstall-:
uninstall-nt:
cd $(NTDIR) && \
$(MAKE) $(MFLAGS) uninstall \
prefix=${prefix} exec_prefix=${exec_prefix} \
bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}
FRC: FRC:
# ==================== Cleaning up and miscellanea ==================== # ==================== Cleaning up and miscellanea ====================
...@@ -744,6 +781,7 @@ mostlyclean: FRC ...@@ -744,6 +781,7 @@ mostlyclean: FRC
(cd lwlib; $(MAKE) $(MFLAGS) mostlyclean) (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
(cd lib; $(MAKE) $(MFLAGS) mostlyclean) (cd lib; $(MAKE) $(MFLAGS) mostlyclean)
(cd lib-src; $(MAKE) $(MFLAGS) mostlyclean) (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
(cd nt; $(MAKE) $(MFLAGS) mostlyclean)
-(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean) -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean)
-(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean) -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean)
-(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean) -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean)
...@@ -765,6 +803,7 @@ clean: FRC ...@@ -765,6 +803,7 @@ clean: FRC
(cd lwlib; $(MAKE) $(MFLAGS) clean) (cd lwlib; $(MAKE) $(MFLAGS) clean)
(cd lib; $(MAKE) $(MFLAGS) clean) (cd lib; $(MAKE) $(MFLAGS) clean)
(cd lib-src; $(MAKE) $(MFLAGS) clean) (cd lib-src; $(MAKE) $(MFLAGS) clean)
(cd nt; $(MAKE) $(MFLAGS) clean)
-(cd doc/emacs && $(MAKE) $(MFLAGS) clean) -(cd doc/emacs && $(MAKE) $(MFLAGS) clean)
-(cd doc/misc && $(MAKE) $(MFLAGS) clean) -(cd doc/misc && $(MAKE) $(MFLAGS) clean)
-(cd doc/lispref && $(MAKE) $(MFLAGS) clean) -(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
...@@ -791,6 +830,7 @@ distclean: FRC ...@@ -791,6 +830,7 @@ distclean: FRC
(cd lwlib; $(MAKE) $(MFLAGS) distclean) (cd lwlib; $(MAKE) $(MFLAGS) distclean)
(cd lib; $(MAKE) $(MFLAGS) distclean) (cd lib; $(MAKE) $(MFLAGS) distclean)
(cd lib-src; $(MAKE) $(MFLAGS) distclean) (cd lib-src; $(MAKE) $(MFLAGS) distclean)
(cd nt; $(MAKE) $(MFLAGS) distclean)
(cd doc/emacs && $(MAKE) $(MFLAGS) distclean) (cd doc/emacs && $(MAKE) $(MFLAGS) distclean)
(cd doc/misc && $(MAKE) $(MFLAGS) distclean) (cd doc/misc && $(MAKE) $(MFLAGS) distclean)
(cd doc/lispref && $(MAKE) $(MFLAGS) distclean) (cd doc/lispref && $(MAKE) $(MFLAGS) distclean)
...@@ -809,6 +849,7 @@ bootstrap-clean: FRC ...@@ -809,6 +849,7 @@ bootstrap-clean: FRC
(cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean) (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
(cd lib; $(MAKE) $(MFLAGS) maintainer-clean) (cd lib; $(MAKE) $(MFLAGS) maintainer-clean)
(cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean) (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
(cd nt; $(MAKE) $(MFLAGS) maintainer-clean)
-(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean) -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean)
-(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean) -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean)
-(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean)
......
This diff is collapsed.
2013-05-16 Eli Zaretskii <eliz@gnu.org>
* NEWS: Advertise the MSYS build on MS-Windows.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca> 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* .gitignore: Don't ignore DOC-* any more. * .gitignore: Don't ignore DOC-* any more.
......
...@@ -29,7 +29,15 @@ build time, like libacl on GNU/Linux. To prevent this, use the ...@@ -29,7 +29,15 @@ build time, like libacl on GNU/Linux. To prevent this, use the
configure option `--disable-acl'. configure option `--disable-acl'.
** The configure option --with-crt-dir has been removed. ** The configure option --with-crt-dir has been removed.
It is no longer needed, as the crt*.o files are no longer linked specially. It is no longer needed, as the crt*.o files are no longer linked
specially.
** Emacs for MS-Windows can now be built by running the configure script
using the MSYS environment and MinGW development tools.
This is from now on the preferred method of building Emacs on
MS-Windows. The Windows-specific configure.bat and makefile.w32-in
files are deprecated. See the file nt/INSTALL.MSYS for detailed
instructions.
* Startup Changes in Emacs 24.4 * Startup Changes in Emacs 24.4
......
2013-05-16 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (leim-list.el, check-declare): Use reveal-filename.
2013-04-01 Paul Eggert <eggert@cs.ucla.edu> 2013-04-01 Paul Eggert <eggert@cs.ucla.edu>
Use UTF-8 for most files with non-ASCII characters (Bug#13936). Use UTF-8 for most files with non-ASCII characters (Bug#13936).
......
...@@ -140,7 +140,7 @@ leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el ...@@ -140,7 +140,7 @@ leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
--eval "(update-leim-list-file \".\")" ; \ --eval "(update-leim-list-file \".\")" ; \
else \ else \
${RUN_EMACS} -l ${buildlisppath}/international/quail \ ${RUN_EMACS} -l ${buildlisppath}/international/quail \
--eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \ --eval "(update-leim-list-file \".\" (reveal-filename \"${srcdir}\"))" ; \
fi fi
sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@ sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
...@@ -199,4 +199,4 @@ extraclean: maintainer-clean ...@@ -199,4 +199,4 @@ extraclean: maintainer-clean
check-declare: check-declare:
$(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \ $(RUN_EMACS) -l $(buildlisppath)/emacs-lisp/check-declare \
--eval '(check-declare-directory "$(srcdir)")' --eval '(check-declare-directory (reveal-filename "$(srcdir)"))'
2013-05-16 Eli Zaretskii <eliz@gnu.org>
* update-game-score.c [WINDOWSNT]: Include "ntlib.h".
* ntlib.h (sleep): Update prototype.
(geteuid): Add prototype.
* ntlib.c (sleep): Now returns an unsigned value.
(getgid): New function.
* Makefile.in (CLIENTW, LIB_WSOCK32, LIBS_ECLIENT, NTLIB)
(CLIENTRES, WINDRES, NTINC, NTDEPS): New variables.
(INSTALLABLES): Add $(CLIENTW).
(LIBS_MOVE): Use $(LIB_WSOCK32).
($(DESTDIR)${archlibdir}): Use $(EXEEXT) on update-game-score.
(test-distrib${EXEEXT}): Use $(EXEEXT) on test-distrib.
(etags${EXEEXT}, ebrowse${EXEEXT}, ctags${EXEEXT})
(profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
(emacsclient${EXEEXT}, hexl${EXEEXT}, update-game-score${EXEEXT}):
Add $(NTLIB) to prerequisites. Use $(EXEEXT).
(pop.o): Add pop.h to prerequisites.
(emacsclientw${EXEEXT}, ntlib.o): New targets.
(emacsclient.res): New target.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca> 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* makefile.w32-in ($(DOC)): Use DOC rather than DOC-X. * makefile.w32-in ($(DOC)): Use DOC rather than DOC-X.
......
...@@ -113,8 +113,11 @@ MKDIR_P = @MKDIR_P@ ...@@ -113,8 +113,11 @@ MKDIR_P = @MKDIR_P@
# ========================== Lists of Files =========================== # ========================== Lists of Files ===========================
# emacsclientw.exe for MinGW, empty otherwise
CLIENTW = @CLIENTW@
# Things that a user might actually run, which should be installed in bindir. # Things that a user might actually run, which should be installed in bindir.
INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
ebrowse${EXEEXT} ebrowse${EXEEXT}
INSTALLABLE_SCRIPTS = grep-changelog INSTALLABLE_SCRIPTS = grep-changelog
...@@ -163,10 +166,21 @@ LIBS_MAIL=@LIBS_MAIL@ ...@@ -163,10 +166,21 @@ LIBS_MAIL=@LIBS_MAIL@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
## empty or -lrt or -lposix4 if HAVE_FDATASYNC ## empty or -lrt or -lposix4 if HAVE_FDATASYNC
LIB_FDATASYNC = @LIB_FDATASYNC@ LIB_FDATASYNC = @LIB_FDATASYNC@
## empty or -lwsock2 for MinGW
LIB_WSOCK32=@LIB_WSOCK32@
## Extra libraries to use when linking movemail. ## Extra libraries to use when linking movemail.
LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
$(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32)
## Extra libraries when linking emacsclient
## (empty or -lcomctl32 for MinGW)
LIBS_ECLIENT = @LIBS_ECLIENT@
## Extra object files for linking for MinGW
NTLIB = @NTLIB@
CLIENTRES = @CLIENTRES@
WINDRES = @WINDRES@
## Some systems define this to request special libraries. ## Some systems define this to request special libraries.
LIBS_SYSTEM = @LIBS_SYSTEM@ LIBS_SYSTEM = @LIBS_SYSTEM@
...@@ -227,7 +241,7 @@ $(DESTDIR)${archlibdir}: all ...@@ -227,7 +241,7 @@ $(DESTDIR)${archlibdir}: all
umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \ umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \
touch $(DESTDIR)${gamedir}/snake-scores; \ touch $(DESTDIR)${gamedir}/snake-scores; \
touch $(DESTDIR)${gamedir}/tetris-scores touch $(DESTDIR)${gamedir}/tetris-scores
-if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score${EXEEXT} && chmod u+s $(DESTDIR)${archlibdir}/update-game-score${EXEEXT}; then \
chown ${gameuser} $(DESTDIR)${gamedir}; \ chown ${gameuser} $(DESTDIR)${gamedir}; \
chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
fi fi
...@@ -292,7 +306,7 @@ TAGS: etags${EXEEXT} ...@@ -292,7 +306,7 @@ TAGS: etags${EXEEXT}
## distribute Emacs. If they were clobbered, all the .elc files were ## distribute Emacs. If they were clobbered, all the .elc files were
## clobbered too. ## clobbered too.
test-distrib${EXEEXT}: ${srcdir}/test-distrib.c test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c
./test-distrib ${srcdir}/testfile ./test-distrib ${srcdir}/testfile
../lib/libgnu.a: $(config_h) ../lib/libgnu.a: $(config_h)
...@@ -302,47 +316,68 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) ...@@ -302,47 +316,68 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
${srcdir}/../src/regex.c ${srcdir}/../src/regex.c
etags${EXEEXT}: ${srcdir}/etags.c regex.o $(config_h) etags${EXEEXT}: ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
-DVERSION="\"${version}\"" ${srcdir}/etags.c \ -DVERSION="\"${version}\"" ${srcdir}/etags.c \
regex.o $(LOADLIBES) -o etags regex.o $(LOADLIBES) $(NTLIB) -o etags${EXEEXT}
ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(config_h) ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
$(config_h)
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse ${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o ebrowse${EXEEXT}
## We depend on etags to assure that parallel makes do not write two ## We depend on etags to assure that parallel makes do not write two
## etags.o files on top of each other. ## etags.o files on top of each other.
ctags${EXEEXT}: etags${EXEEXT} ctags${EXEEXT}: etags${EXEEXT}
$(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
-DVERSION="\"${version}\"" ${srcdir}/etags.c \ -DVERSION="\"${version}\"" ${srcdir}/etags.c \
regex.o $(LOADLIBES) -o ctags regex.o $(LOADLIBES) $(NTLIB) -o ctags${EXEEXT}
profile${EXEEXT}: ${srcdir}/profile.c $(config_h) profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \ $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
$(LOADLIBES) $(LIB_CLOCK_GETTIME) -o profile $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT}
make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(config_h) make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) $(NTLIB) \
-o make-docfile -o make-docfile${EXEEXT}
movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(config_h) movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \ $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \
$(LOADLIBES) $(LIBS_MOVE) -o movemail $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o movemail${EXEEXT}
pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h)
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h) emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
-DVERSION="\"${version}\"" \ -DVERSION="\"${version}\"" $(NTLIB) $(LOADLIBES) $(LIB_FDATASYNC) \
$(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclient${EXEEXT}
emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \
-DVERSION="\"${version}\"" $(LOADLIBES) $(LIB_FDATASYNC) \
$(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclientw${EXEEXT}
hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h) NTINC = ${srcdir}/../nt/inc
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
$(NTINC)/stdint.h $(NTINC)/pwd.h $(NTINC)/sys/time.h $(NTINC)/stdbool.h \
$(NTINC)/sys/wait.h $(NTINC)/unistd.h $(NTINC)/sys/file.h $(NTINC)/netdb.h
update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(config_h) # The dependency on $(NTDEPS) is a trick intended to cause recompile of
# programs on MinGW whenever some private header in nt/inc is modified.
ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h $(NTDEPS)
$(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c
hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT}
update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
$(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
${srcdir}/update-game-score.c $(LOADLIBES) -o update-game-score ${srcdir}/update-game-score.c $(LOADLIBES) $(NTLIB) \
-o update-game-score${EXEEXT}
emacsclient.res: $(NTINC)/../emacsclient.rc
$(WINDRES) -O coff --include-dir=$(NTINC)/.. -o emacsclient.res \
$(NTINC)/../emacsclient.rc
## Makefile ends here. ## Makefile ends here.
...@@ -49,10 +49,11 @@ struct timezone ...@@ -49,10 +49,11 @@ struct timezone
/* Emulate sleep...we could have done this with a define, but that /* Emulate sleep...we could have done this with a define, but that
would necessitate including windows.h in the files that used it. would necessitate including windows.h in the files that used it.
This is much easier. */ This is much easier. */
void unsigned
sleep (unsigned long seconds) sleep (unsigned seconds)
{ {
Sleep (seconds * 1000); Sleep (seconds * 1000);