changeset 1203:5f2f8dcbfb3e

[xemacs-hg @ 2003-01-12 11:04:30 by michaels] 2002-12-16 Ben Wing <ben@xemacs.org> * README (NOTE): * config.inc.samp: * config.inc.samp (PACKAGE_PREFIX): * config.inc.samp (GTK_DIR): * config.inc.samp (COMPFACE_DIR): * config.inc.samp (USE_FASTCALL): * config.inc.samp (HAVE_VC6): New. * config.inc.samp (PROFILE_SUPPORT): * config.inc.samp (DEBUG_XEMACS): * config.inc.samp (USE_PORTABLE_DUMPER): * config.inc.samp (USE_KKCC): New. * config.inc.samp (USE_UNION_TYPE): New. * xemacs.dsp (CFG): * xemacs.mak (HAVE_VC6): * xemacs.mak (ERROR_CHECK_ALL): New. * xemacs.mak (CPLUSPLUS_COMPILE): New. * xemacs.mak (USE_KKCC): New. * xemacs.mak (USE_UNION_TYPE): New. * xemacs.mak (USE_PORTABLE_DUMPER): * xemacs.mak (PROFILE_FLAGS): * xemacs.mak (CPLUSPLUS_COMPILE_FLAGS): New. * xemacs.mak (DUMPER_DEFINES): * xemacs.mak (KKCC_DEFINES): New. * xemacs.mak (DEFINES): * xemacs.mak (LASTFILE_FLAGS): * xemacs.mak (TEMACS_CPP_FLAGS_NO_CFLAGS): * xemacs.mak (OS): Support C++ compilation, KKCC compilation. See src/ChangeLog. Add stuff about the evilness of USE_UNION_TYPE.
author michaels
date Sun, 12 Jan 2003 11:04:30 +0000
parents 6041a741b6d6
children e22b0213b713
files nt/ChangeLog nt/README nt/config.inc.samp nt/xemacs.dsp nt/xemacs.mak
diffstat 5 files changed, 147 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/nt/ChangeLog	Sun Jan 12 11:03:16 2003 +0000
+++ b/nt/ChangeLog	Sun Jan 12 11:04:30 2003 +0000
@@ -1,3 +1,36 @@
+2002-12-16  Ben Wing  <ben@xemacs.org>
+
+	* README (NOTE):
+	* config.inc.samp:
+	* config.inc.samp (PACKAGE_PREFIX):
+	* config.inc.samp (GTK_DIR):
+	* config.inc.samp (COMPFACE_DIR):
+	* config.inc.samp (USE_FASTCALL):
+	* config.inc.samp (HAVE_VC6): New.
+	* config.inc.samp (PROFILE_SUPPORT):
+	* config.inc.samp (DEBUG_XEMACS):
+	* config.inc.samp (USE_PORTABLE_DUMPER):
+	* config.inc.samp (USE_KKCC): New.
+	* config.inc.samp (USE_UNION_TYPE): New.
+	* xemacs.dsp (CFG):
+	* xemacs.mak (HAVE_VC6):
+	* xemacs.mak (ERROR_CHECK_ALL): New.
+	* xemacs.mak (CPLUSPLUS_COMPILE): New.
+	* xemacs.mak (USE_KKCC): New.
+	* xemacs.mak (USE_UNION_TYPE): New.
+	* xemacs.mak (USE_PORTABLE_DUMPER):
+	* xemacs.mak (PROFILE_FLAGS):
+	* xemacs.mak (CPLUSPLUS_COMPILE_FLAGS): New.
+	* xemacs.mak (DUMPER_DEFINES):
+	* xemacs.mak (KKCC_DEFINES): New.
+	* xemacs.mak (DEFINES):
+	* xemacs.mak (LASTFILE_FLAGS):
+	* xemacs.mak (TEMACS_CPP_FLAGS_NO_CFLAGS):
+	* xemacs.mak (OS):
+
+	Support C++ compilation, KKCC compilation.  See src/ChangeLog.
+	Add stuff about the evilness of USE_UNION_TYPE.
+
 2003-01-04  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.10 "burdock" is released.
--- a/nt/README	Sun Jan 12 11:03:16 2003 +0000
+++ b/nt/README	Sun Jan 12 11:04:30 2003 +0000
@@ -281,14 +281,20 @@
     MS Developer Studio.  Build and debug your XEmacs this way.
 
 3.  To display the contents of a lisp variable, type Shift-F9 (or use the
-    menu) to bring up the QuickWatch window, type debug_print(variable) and
-    click Recalculate. The output will appear in a console window, as well
-    as in the Debug window in MS Developer Studio.
+    menu) to bring up the QuickWatch window, type dp(variable) and click
+    Recalculate. The output will appear in a console window, as well as in
+    the Debug window in MS Developer Studio.
 
-4.  To view Lisp variables in the "Watch" window wrap the variable in one of
+4.  To display a current Lisp backtrace, type db() in the QuickWatch window,
+    as in the previous item.
+
+5.  To view Lisp variables in the "Watch" window wrap the variable in one of
     the helper functions from the file src\console-msw.c, for example type
     DSTRING(variable) in the "Watch" window to inspect a Lisp string.
 
+6.  For further information on debugging XEmacs, see the item
+    `How to Debug an XEmacs problem with a debugger' in the XEmacs FAQ.
+
 
 * Known Problems
 ================
--- a/nt/config.inc.samp	Sun Jan 12 11:03:16 2003 +0000
+++ b/nt/config.inc.samp	Sun Jan 12 11:04:30 2003 +0000
@@ -1,12 +1,16 @@
 # -*- mode: makefile -*-
 
 ############################################################################
+#                            Install options                               #
+############################################################################
 
 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
 
 PACKAGE_PREFIX=c:\Program Files\XEmacs
 
 ############################################################################
+#                      Compiled-in features: basic                         #
+############################################################################
 
 # Multilingual support.
 MULE=0
@@ -27,6 +31,8 @@
 GTK_DIR=
 
 ############################################################################
+#                  Compiled-in features: graphics formats                  #
+############################################################################
 
 # Set this to enable XPM support (virtually mandatory), and specify
 # the directory containing xpm.
@@ -56,12 +62,15 @@
 COMPFACE_DIR=
 
 ############################################################################
+#                            Build settings                                #
+############################################################################
 
 # Set this to specify the location of makeinfo. (If not set, XEmacs will
-# attempt to use its built-in texinfo support when building info files.)
-MAKEINFO=c:\src\texinfo-4.0\makeinfo\makeinfo.exe
-
-############################################################################
+# attempt to use its built-in, much slower texinfo support when building
+# info files.) If you are building XEmacs yourself, you probably have
+# Cygwin sitting around already.  If not, you should.  Cygwin provides a
+# `makeinfo.exe' in /usr/bin/makeinfo.
+MAKEINFO=c:\cygwin\usr\bin\makeinfo.exe
 
 # Set this to turn on optimization when compiling.
 OPTIMIZED_BUILD=0
@@ -71,14 +80,17 @@
 # #### Change to 1 when I check in the ws with support for fastcall
 USE_FASTCALL=0
 
-# Set this to compile in support for profiling.  If you want line-by-line
-# profiling under VC++, you also need debugging turned on.
-PROFILE_SUPPORT=0
+# True if running VC++ 6 or later.
+HAVE_VC6=1
 
 ############################################################################
 #                          Development options                             #
 ############################################################################
 
+# Set this to compile in support for profiling.  If you want line-by-line
+# profiling under VC++, you also need debugging turned on.
+PROFILE_SUPPORT=0
+
 # Set this to enable debug code in XEmacs that doesn't slow things down,
 # and to add debugging information to the executable. (The code that's
 # enabled in XEmacs is primarily extra commands that aid in debugging
@@ -87,15 +99,17 @@
 # variable, below.)
 DEBUG_XEMACS=1
 
-# True if running VC++ 6 or later.
-HAVE_VC6=1
-
 # Uncomment this to turn off or on the error-checking code, which adds
 # abundant internal error checking (and slows things down a lot).  Normally,
 # leave this alone -- it will be on for beta builds and off for release
 # builds.
 # ERROR_CHECK_ALL=0
 
+# Uncomment this to turn on or off whether we compile source files as C++
+# files.  This turns on additional error checking of various sorts.  Normally,
+# leave it alone -- it will be on when ERROR_CHECK_ALL is on.
+# CPLUSPLUS_COMPILE=0
+
 # Set this to speed up building, for development purposes.
 QUICK_BUILD=0
 
@@ -111,17 +125,31 @@
 # routines, instead of the older "unexec" routines in unexnt.c.
 USE_PORTABLE_DUMPER=1
 
-# Set this to get improved type checking of Lisp_Objects -- with this
-# setting, they're declared as unions instead of ints, and so places where
-# a Lisp_Object is mistakenly passed to a routine expecting an int (or
-# vice-versa), or a check is written `if (foo)' instead of `if (!NILP
-# (foo))', will be flagged as errors. (All of these do NOT lead to the
-# expected results!  Qnil is not represented as 0 (so if (foo) will
-# *ALWAYS* be true for a Lisp_Object), the representation of an integer as
-# a Lisp_Object is not just the integer's numeric value (but usually 2x the
-# integer +/- 1).
+# Set this to use new experimental GC algorithms.
+USE_KKCC=0
+
+# Set this to turn on the use of the union type, which gets you improved
+# type checking of Lisp_Objects -- they're declared as unions instead of
+# ints, and so places where a Lisp_Object is mistakenly passed to a routine
+# expecting an int (or vice-versa), or a check is written `if (foo)'
+# instead of `if (!NILP (foo))', will be flagged as errors. (All of these
+# do NOT lead to the expected results!  Qnil is not represented as 0 [so if
+# (foo) will *ALWAYS* be true for a Lisp_Object], and the representation of
+# an integer as a Lisp_Object is not just the integer's numeric value, but
+# usually 2x the integer +/- 1.)
 
-# Some also claim it simplifies debugging, but I don't really believe them.
-# Definitely don't do your normal builds this way, because you may well get
-# less efficiency, and could conceivably trigger compiler bugs (has definitely happened, many times, with gcc).
-# USE_UNION_TYPE=1
+# There used to be a claim that it simplified debugging.  There may have
+# been a grain of truth to this pre-19.8, when there was no lrecord type
+# and all objects had a separate type appearing in the tag.  Nowadays,
+# however, there is no debugging gain, and in fact frequent debugging *LOSS*,
+# since many debuggers don't handle unions very well, and usually there is
+# no way to directly specify a union from a debugging prompt.
+
+# Furthermore, release builds should *NOT* be done this way because (a) you
+# may get less efficiency, with compilers that can't figure out how to
+# optimize the union into a machine word; (b) even worse, the union type
+# often triggers compiler bugs, especially when combined with Mule and
+# error-checking.  This has been the case with various times using GCC,
+# *AND CURRENTLY HAPPENS WITH VC++*, at least when using pdump.  Therefore,
+# be warned!
+USE_UNION_TYPE=0
--- a/nt/xemacs.dsp	Sun Jan 12 11:03:16 2003 +0000
+++ b/nt/xemacs.dsp	Sun Jan 12 11:04:30 2003 +0000
@@ -58,7 +58,7 @@
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "..\src"
 # PROP Intermediate_Dir "obj"
-# PROP Cmd_Line "NMAKE /k /f xemacs.mak"
+# PROP Cmd_Line "NMAKE /f xemacs.mak"
 # PROP Rebuild_Opt "/a"
 # PROP Target_File "..\src\xemacs.exe"
 # PROP Bsc_Name "..\src\temacs.bsc"
--- a/nt/xemacs.mak	Sun Jan 12 11:03:16 2003 +0000
+++ b/nt/xemacs.mak	Sun Jan 12 11:04:30 2003 +0000
@@ -188,9 +188,28 @@
 !if !defined(HAVE_VC6)
 HAVE_VC6=1
 !endif
+
 !if !defined(ERROR_CHECK_ALL)
-# Turn off when not a beta XEmacs.
+!if "$(emacs_is_beta)" != ""
 ERROR_CHECK_ALL=1
+!else
+ERROR_CHECK_ALL=0
+!endif
+!endif
+
+!if !defined(CPLUSPLUS_COMPILE)
+!if $(ERROR_CHECK_ALL)
+CPLUSPLUS_COMPILE=1
+!else
+CPLUSPLUS_COMPILE=0
+!endif
+!endif
+
+!if !defined(USE_KKCC)
+USE_KKCC=0
+!endif
+!if !defined(USE_UNION_TYPE)
+USE_UNION_TYPE=0
 !endif
 !if !defined(QUICK_BUILD)
 QUICK_BUILD=0
@@ -204,15 +223,9 @@
 !if !defined(USE_PORTABLE_DUMPER)
 USE_PORTABLE_DUMPER=1
 !endif
-!if !defined(USE_UNION_TYPE)
-USE_UNION_TYPE=0
-!endif
 !if !defined(USE_MINITAR)
 USE_MINITAR=$(HAVE_ZLIB)
 !endif
-!if !defined(USE_KKCC)
-USE_KKCC=1
-!endif
 
 # A little bit of adhockery. Default to use system malloc and
 # DLL version of the C runtime library when using portable
@@ -430,6 +443,12 @@
 PROFILE_FLAGS=
 !endif
 
+!if $(CPLUSPLUS_COMPILE)
+CPLUSPLUS_COMPILE_FLAGS=-TP
+!else
+CPLUSPLUS_COMPILE_FLAGS=
+!endif
+
 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
 
 CFLAGS_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS)
@@ -527,6 +546,10 @@
 DUMPER_DEFINES=-DPDUMP
 !endif
 
+!if $(USE_KKCC)
+KKCC_DEFINES=-DUSE_KKCC
+!endif
+
 !if $(USE_SYSTEM_MALLOC)
 MALLOC_DEFINES=-DSYSTEM_MALLOC
 !else
@@ -548,8 +571,8 @@
 INCLUDES=$(X_INCLUDES) $(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) -I$(LWLIB_SRCDIR)
 
 DEFINES=$(X_DEFINES) $(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
-	$(DUMPER_DEFINES) $(MALLOC_DEFINES) $(QUICK_DEFINES) \
-	$(ERROR_CHECK_DEFINES) \
+	$(DUMPER_DEFINES) $(KKCC_DEFINES) $(MALLOC_DEFINES) \
+	$(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) \
 	-DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
 	-DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
 
@@ -664,7 +687,7 @@
 
 LASTFILE=$(OUTDIR)\lastfile.lib
 LASTFILE_SRC=$(SRC)
-LASTFILE_FLAGS=$(CFLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
+LASTFILE_FLAGS=$(CFLAGS) $(CPLUSPLUS_COMPILE_FLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
 LASTFILE_OBJS= \
 	$(OUTDIR)\lastfile.obj
 
@@ -749,7 +772,8 @@
  -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows\
  -pdb:$(TEMACS_DIR)\temacs.pdb -map:$(TEMACS_DIR)\temacs.map \
  -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
-TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
+TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(CPLUSPLUS_COMPILE_FLAGS) \
+ $(INCLUDES) $(DEFINES) $(DEBUG_DEFINES) \
  -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
  -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
  $(EMACS_BETA_VERSION) \
@@ -1460,6 +1484,9 @@
 !if defined(CCV)
   Using compiler "$(CC) $(CFLAGS)".
 !endif
+!if $(CPLUSPLUS_COMPILE)
+  Compiling as C++.
+!endif
   Installing XEmacs in "$(INSTALL_DIR:\=\\)".
   Package path is $(PATH_PACKAGEPATH).
 !if $(INFODOCK)
@@ -1477,8 +1504,8 @@
 !if $(HAVE_GTK)
   --------------------------------------------------------------------
   WARNING: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
-  WARNING: gtk-xemacs is not currently supported on MSWindows (mingw or msvc).
-  WARNING: Yes, we know that gtk has been ported to native MSWindows, but
+  WARNING: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
+  WARNING: Yes, we know that gtk has been ported to native MS Windows, but
   WARNING: XEmacs is not yet ready to use that port.
   --------------------------------------------------------------------
 !endif
@@ -1531,6 +1558,12 @@
 !endif
 !if $(USE_UNION_TYPE)
   Using union type for Lisp object storage.
+  WARNING: ---------------------------------------------------------
+  WARNING: This tends to trigger compiler bugs, especially when combined
+  WARNING: with MULE and ERROR_CHECKING.  Crashes in pdump have recently
+  WARNING: been observed using Visual C++ in combination with union type,
+  WARNING: MULE, and ERROR_CHECKING.
+  WARNING: ---------------------------------------------------------
 !endif
 !if $(USE_PORTABLE_DUMPER)
   Using portable dumper.
@@ -1542,7 +1575,12 @@
   Using DLL version of C runtime library.
 !endif
 !if $(ERROR_CHECK_ALL)
-  Compiling in extra internal error-checking. XEmacs will be slow!
+  Compiling in extra internal error-checking.
+  WARNING: ---------------------------------------------------------
+  WARNING: Compiling in support for runtime error checking.
+  WARNING: XEmacs will run noticeably more slowly as a result.
+  WARNING: Error checking is on by default for XEmacs beta releases.
+  WARNING: ---------------------------------------------------------
 !endif
 !if $(DEBUG_XEMACS)
   Compiling in debugging support (no slowdown).