summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-02-07 21:47:19 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-02-07 21:47:19 (GMT)
commit9a6ad6f7e1625a6ce47f8b383c6deab9f7d1a79a (patch)
tree71b132860f94c92cf4726d9431e969814ef41aec
parent33d37367eefd25c2373ed2d0e7d5d33aaf0c4546 (diff)
downloadtcl-9a6ad6f7e1625a6ce47f8b383c6deab9f7d1a79a.zip
tcl-9a6ad6f7e1625a6ce47f8b383c6deab9f7d1a79a.tar.gz
tcl-9a6ad6f7e1625a6ce47f8b383c6deab9f7d1a79a.tar.bz2
* win/makefile.vc:
* win/rules.vc: * win/tcl.rc: * win/tclsh.rc: Added an 'unchecked' option to the OPTS macro so a core build with symbols can be linked to the non-debug enabled C run-time. As per discussion with Kevin Kenny. Called like this: nmake -af makefile.vc OPTS=unchecked,symbols This clarifies the meaning of the 'g' naming suffix to mean only that the binary requires the debug enabled C run-time. Whether the binary contains symbols or not is a seperate condition.
-rw-r--r--win/makefile.vc18
-rw-r--r--win/rules.vc24
-rw-r--r--win/tcl.rc4
-rw-r--r--win/tclsh.rc4
4 files changed, 36 insertions, 14 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index 5128159..d005bd4 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -12,7 +12,7 @@
# Copyright (c) 2001-2004 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.120 2004/01/30 08:10:11 davygrvy Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.121 2004/02/07 21:47:19 davygrvy Exp $
#------------------------------------------------------------------------------
!if "$(MSVCDIR)" == ""
@@ -64,7 +64,7 @@ the environment. Jump to this line to read the new instructions.
# Sets where to install Tcl from the built binaries.
# C:\Progra~1\Tcl is assumed when not specified.
#
-# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
+# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,unchecked,none
# Sets special options for the core. The default is for none.
# Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
@@ -84,6 +84,9 @@ the environment. Jump to this line to read the new instructions.
# profile = Adds profiling hooks. Map file is assumed.
# loimpact = Adds a flag for how NT treats the heap to keep memory
# in use, low. This is said to impact alloc performance.
+# unchecked = Allows a symbols build to not use the debug
+# enabled runtime (msvcrt.dll not msvcrtd.dll
+# or libcmt.lib not libcmtd.lib).
#
# STATS=memdbg,compdbg,none
# Sets optional memory and bytecode compiler debugging code added
@@ -343,7 +346,7 @@ WINDIR = $(ROOT)\win
# Compile flags
#---------------------------------------------------------------------
-!if !$(DEBUG)
+!if !$(DEBUG) || $(UNCHECKED)
!if $(OPTIMIZING)
### This cranks the optimization level to maximize speed
cdebug = -O2 -Op -Gs
@@ -376,13 +379,13 @@ cflags = $(cflags) -QIA64_Bx
!endif
!if $(MSVCRT)
-!if $(DEBUG)
+!if $(DEBUG) && !$(UNCHECKED)
crt = -MDd
!else
crt = -MD
!endif
!else
-!if $(DEBUG)
+!if $(DEBUG) && !$(UNCHECKED)
crt = -MTd
!else
crt = -MT
@@ -691,7 +694,7 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c
### The following objects are part of the stub library and should not
### be built as DLL objects. -Zl is used to avoid a dependancy on any
-### specific c-runtime.
+### specific C run-time.
$(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c
$(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $?
@@ -752,7 +755,8 @@ $<
{$(WINDIR)}.rc{$(TMP_DIR)}.res:
$(rc32) -fo $@ -r -i "$(GENERICDIR)" \
- -d DEBUG=$(DEBUG) -d TCL_THREADS=$(TCL_THREADS) \
+ -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
+ -d TCL_THREADS=$(TCL_THREADS) \
-d STATIC_BUILD=$(STATIC_BUILD) \
$<
diff --git a/win/rules.vc b/win/rules.vc
index f92ed11..0a102c9 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -10,7 +10,7 @@
# Copyright (c) 2001-2003 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: rules.vc,v 1.17 2004/01/15 23:08:10 davygrvy Exp $
+# RCS: @(#) $Id: rules.vc,v 1.18 2004/02/07 21:47:19 davygrvy Exp $
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -129,6 +129,7 @@ MSVCRT = 0
LOIMPACT = 0
TCL_USE_STATIC_PACKAGES = 0
USE_THREAD_ALLOC = 0
+UNCHECKED = 0
!else
!if [nmakehlp -f $(OPTS) "static"]
!message *** Doing static
@@ -178,6 +179,12 @@ USE_THREAD_ALLOC = 1
!else
USE_THREAD_ALLOC = 0
!endif
+!if [nmakehlp -f $(OPTS) "unchecked"]
+!message *** Doing unchecked
+UNCHECKED = 1
+!else
+UNCHECKED = 0
+!endif
!endif
@@ -195,14 +202,25 @@ TCL_USE_STATIC_PACKAGES = 0
# by accident.
#----------------------------------------------------------
+#----------------------------------------
+# Naming convention:
+# t = full thread support.
+# s = static library (as opposed to an
+# import library)
+# g = linked to the debug enabled C
+# run-time.
+# x = special static build when it
+# links to the dynamic C run-time.
+#----------------------------------------
SUFX = tsgx
!if $(DEBUG)
BUILDDIRTOP = Debug
-DBGX = g
!else
BUILDDIRTOP = Release
-DBGX =
+!endif
+
+!if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
SUFX = $(SUFX:g=)
!endif
diff --git a/win/tcl.rc b/win/tcl.rc
index df0b22c..d3cf684 100644
--- a/win/tcl.rc
+++ b/win/tcl.rc
@@ -1,4 +1,4 @@
-// RCS: @(#) $Id: tcl.rc,v 1.10 2004/01/16 02:40:20 davygrvy Exp $
+// RCS: @(#) $Id: tcl.rc,v 1.11 2004/02/07 21:47:19 davygrvy Exp $
//
// Version Resource Script
//
@@ -15,7 +15,7 @@
#define SUFFIX_THREADS ""
#endif
-#if DEBUG
+#if DEBUG && !UNCHECKED
#define SUFFIX_DEBUG "g"
#else
#define SUFFIX_DEBUG ""
diff --git a/win/tclsh.rc b/win/tclsh.rc
index 01c9bd8..dd781da 100644
--- a/win/tclsh.rc
+++ b/win/tclsh.rc
@@ -1,4 +1,4 @@
-// RCS: @(#) $Id: tclsh.rc,v 1.10 2004/01/16 02:40:20 davygrvy Exp $
+// RCS: @(#) $Id: tclsh.rc,v 1.11 2004/02/07 21:47:19 davygrvy Exp $
//
// Version Resource Script
//
@@ -21,7 +21,7 @@
#define SUFFIX_STATIC ""
#endif
-#if DEBUG
+#if DEBUG && !UNCHECKED
#define SUFFIX_DEBUG "g"
#else
#define SUFFIX_DEBUG ""