Fix the MS-Windows build broken by 2011-01-30T23:34:18Z!eggert@cs.ucla.edu and 2011-01-31T08:15:13Z!eggert@cs.ucla.edu.

lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and
 $(BLD)/time_r.$(O).
 ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and
 $(EMACS_ROOT)/src/m/intel386.h.
 ($(BLD)/strftime.$(O)): 
 ($(BLD)/time_r.$(O)): Define prerequisites.
 src/makefile.w32-in (OBJ2): Remove strftime.$(O).
 ($(BLD)/strftime.$(O)): Remove prerequisites.
 lib-src/makefile.w32-in (VERSION): Don't define, defined on nt/config.nt.
 (ECLIENT_CFLAGS): Remove -DVERSION.
 ($(BLD)/emacsclient.$(O)): Don't depend on makefile.w32-in.
 nt/config.nt (VERSION): Uncomment definition.
 (restrict): Define.
 nt/inc/stdbool.h: New file.
 admin/admin.el (set-version): Remove lib-src/makefile.w32-in.  Add
 nt/config.nt.
This commit is contained in:
Eli Zaretskii 2011-01-31 21:36:08 +02:00
parent 1dc4075fa8
commit 70b0d280eb
11 changed files with 82 additions and 20 deletions

View file

@ -1,3 +1,12 @@
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and
$(BLD)/time_r.$(O).
($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and
$(EMACS_ROOT)/src/m/intel386.h.
($(BLD)/strftime.$(O)):
($(BLD)/time_r.$(O)): Define prerequisites.
2011-01-31 Paul Eggert <eggert@cs.ucla.edu>
src/emacs.c now gets version number from configure.in

View file

@ -1,3 +1,8 @@
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* admin.el (set-version): Remove lib-src/makefile.w32-in. Add
nt/config.nt.
2011-01-31 Paul Eggert <eggert@cs.ucla.edu>
src/emacs.c now gets version number from configure.in

View file

@ -73,8 +73,9 @@ Root must be the root of an Emacs source tree."
(rx (and ".TH EMACS" (1+ not-newline)
"GNU Emacs" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file root "lib-src/makefile.w32-in" version
(rx (and "VERSION" (0+ space) "=" (0+ space)
(set-version-in-file root "nt/config.nt" version
(rx (and bol "#" (0+ blank) "define" (1+ blank)
"VERSION" (1+ blank)
(submatch (1+ (in "0-9."))))))
(set-version-in-file root "nt/makefile.w32-in" version
(rx (and "VERSION" (0+ space) "=" (0+ space)

View file

@ -1,3 +1,9 @@
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (VERSION): Don't define, defined on nt/config.nt.
(ECLIENT_CFLAGS): Remove -DVERSION.
($(BLD)/emacsclient.$(O)): Don't depend on makefile.w32-in.
2011-01-31 Paul Eggert <eggert@cs.ucla.edu>
src/emacs.c now gets version number from configure.in

View file

@ -21,8 +21,6 @@ ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient
.PHONY: $(ALL)
VERSION = 24.0.50
LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
-DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \
-I../nt/inc -I../src
@ -59,7 +57,7 @@ $(BLD)/movemail.exe: $(MOVEMAILOBJS) ../lib/getopt.h
# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
$(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS)
ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR -DVERSION="\"$(VERSION)\""
ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR
ECLIENTOBJS = $(BLD)/emacsclient.$(O) \
$(BLD)/ntlib.$(O) \
../lib/$(BLD)/libgnu.$(A)
@ -77,9 +75,7 @@ $(BLD)/emacsclientw.exe: $(ECLIENTOBJS) $(CLIENTRES)
# put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
$(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
# emacsclient.$(O) depends on makefile.w32-in because makefile.w32-in
# can be edited to define VERSION string, which is part of ECLIENT_CFLAGS.
$(BLD)/emacsclient.$(O): emacsclient.c makefile.w32-in
$(BLD)/emacsclient.$(O): emacsclient.c
$(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c
ETAGSOBJ = $(BLD)/etags.$(O) \

View file

@ -23,7 +23,11 @@ ALL = gnulib
LOCAL_FLAGS = -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src
LIBS =
GNULIBOBJS = $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O)
GNULIBOBJS = $(BLD)/dtoastr.$(O) \
$(BLD)/getopt.$(O) \
$(BLD)/getopt1.$(O) \
$(BLD)/strftime.$(O) \
$(BLD)/time_r.$(O)
#
# Build the library
@ -54,6 +58,8 @@ $(BLD)/dtoastr.$(O) : \
$(SRC)/ftoastr.c \
$(SRC)/ftoastr.h \
$(SRC)/intprops.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/getopt.$(O) : \
@ -72,10 +78,26 @@ $(BLD)/getopt1.$(O) : \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/strftime.$(O) : \
$(SRC)/strftime.c \
$(SRC)/strftime.h \
$(EMACS_ROOT)/nt/inc/stdbool.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/time_r.$(O) : \
$(SRC)/time_r.c \
$(EMACS_ROOT)/nt/inc/stdbool.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
# The following dependencies are for supporting parallel builds, where
# we must make sure $(BLD) exists before any compilation starts.
#
$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
$(BLD)/strftime.$(O) $(BLD)/time_r.$(O): stamp_BLD
#
# Headers we would preprocess if we could.

View file

@ -1,3 +1,7 @@
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* inc/stdbool.h: New file.
2011-01-29 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake)

View file

@ -305,13 +305,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Name of package */
#define PACKAGE "emacs"
/* FIXME: This is defined by the various makefile.w32-in files for
now. Revisit if/when VERSION from config.h is used by any
Makefile.in files. */
#if 0
/* Version number of package */
#define VERSION "24.0.50"
#endif
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
@ -319,6 +314,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef inline
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#ifdef __GNUC__
# define restrict __restrict__
#else
# define restrict
#endif
/* Define as a marker that can be attached to declarations that might not
be used. This helps to reduce warnings, such as from
GCC -Wunused-parameter. */

16
nt/inc/stdbool.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef _NT_STDBOOL_H_
#define _NT_STDBOOL_H_
/*
* stdbool.h exists in GCC, but not in MSVC.
*/
#ifdef __GNUC__
# include_next <stdbool.h>
#else
# define _Bool signed char
# define bool _Bool
# define false 0
# define true 1
#endif
#endif /* _NT_STDBOOL_H_ */

View file

@ -1,3 +1,8 @@
2011-01-31 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (OBJ2): Remove strftime.$(O).
($(BLD)/strftime.$(O)): Remove prerequisites.
2011-01-31 Paul Eggert <eggert@cs.ucla.edu>
src/emacs.c now gets version number from configure.in

View file

@ -113,7 +113,6 @@ OBJ2 = $(BLD)/sysdep.$(O) \
$(BLD)/textprop.$(O) \
$(BLD)/vm-limit.$(O) \
$(BLD)/region-cache.$(O) \
$(BLD)/strftime.$(O) \
$(BLD)/bidi.$(O) \
$(BLD)/charset.$(O) \
$(BLD)/character.$(O) \
@ -1363,11 +1362,6 @@ $(BLD)/sound.$(O) : \
$(SRC)/systime.h \
$(SRC)/w32gui.h
$(BLD)/strftime.$(O) : \
$(SRC)/strftime.c \
$(CONFIG_H) \
$(EMACS_ROOT)/nt/inc/sys/time.h
$(BLD)/syntax.$(O) : \
$(SRC)/syntax.c \
$(CONFIG_H) \