summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
Diffstat (limited to 'win/makefile.vc')
-rw-r--r--win/makefile.vc85
1 files changed, 34 insertions, 51 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index 447ad0e..4c050d1 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.160.2.4 2007/09/17 15:03:48 dgp Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.160.2.5 2007/10/15 18:38:09 dgp Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -103,13 +103,14 @@ the build instructions.
# memdbg = Enables the debugging memory allocator.
# compdbg = Enables byte compilation logging.
#
-# CHECKS=nodep,fullwarn,none
+# CHECKS=nodep,fullwarn,64bit,none
# Sets special macros for checking compatability.
#
# nodep = Turns off compatability macros to ensure the core
# isn't being built with deprecated functions.
# fullwarn = Builds with full compiler and link warnings enabled.
# Very verbose.
+# 64bit = Enable 64bit portability warnings (if available)
#
# MACHINE=(IX86|IA64|AMD64|ALPHA)
# Set the machine type used for the compiler, linker, and
@@ -175,20 +176,9 @@ Please `cd` to its location first.
PROJECT = tcl
!include "rules.vc"
-STUBPREFIX = $(PROJECT)stub
-
-!if [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 85
-DOTVERSION = 8.5
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 86
-DOTVERSION = 8.6
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 90
-DOTVERSION = 9.0
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 0
-MSG =^
-Cannot get version string from ../generic/tcl.h
-!error $(MSG)
-!endif
-VERSION = $(DOTVERSION:.=)
+STUBPREFIX = $(PROJECT)stub
+DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
+VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
DDEDOTVERSION = 1.3
DDEVERSION = $(DDEDOTVERSION:.=)
@@ -252,8 +242,6 @@ TCLOBJS = \
$(TMP_DIR)\regerror.obj \
$(TMP_DIR)\regexec.obj \
$(TMP_DIR)\regfree.obj \
- $(TMP_DIR)\strtoll.obj \
- $(TMP_DIR)\strtoull.obj \
$(TMP_DIR)\tclAlloc.obj \
$(TMP_DIR)\tclAsync.obj \
$(TMP_DIR)\tclBasic.obj \
@@ -430,15 +418,9 @@ cdebug = -Zi -WX $(DEBUGFLAGS)
!endif
### Declarations common to all compiler options
-cwarn = -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
+cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
-!if $(FULLWARNINGS)
-cflags = $(cflags) -W4
-!else
-cflags = $(cflags) -W3
-!endif
-
!if $(MSVCRT)
!if $(DEBUG) && !$(UNCHECKED)
crt = -MDd
@@ -454,9 +436,8 @@ crt = -MT
!endif
TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)"
-BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) \
- -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH \
- -DMP_PREC=4 -Dinline=__inline
+TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline
+BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES)
CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE
TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES)
STUB_CFLAGS = $(cflags) $(cdebug) $(OPTDEFINES)
@@ -475,10 +456,6 @@ ldebug = -release -opt:ref -opt:icf,3
### Declarations common to all linker options
lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
-!if $(FULLWARNINGS)
-lflags = $(lflags) -warn:3
-!endif
-
!if $(PROFILE)
lflags = $(lflags) -profile
!endif
@@ -650,23 +627,6 @@ gentommath_h:
!endif
#---------------------------------------------------------------------
-# Generate the makefile depedancies.
-#---------------------------------------------------------------------
-
-depend:
-!if !exist($(TCLSH))
- @echo Build tclsh first!
-!else
- $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
- -passthru:"-DBUILD_tcl $(TCL_INCLUDES:"="")" $(GENERICDIR) \
- $(COMPATDIR) $(WINDIR) @<<
-$(TCLOBJS)
-<<
-!endif
-
-#" for emacs font-locking.
-
-#---------------------------------------------------------------------
# Build the windows help file.
#---------------------------------------------------------------------
@@ -796,11 +756,13 @@ $(OUT_DIR)\tclConfig.sh: $(WINDIR)\tclConfig.sh.in
<<
+#---------------------------------------------------------------------
# The following target generates the file generic/tclDate.c
# from the yacc grammar found in generic/tclGetDate.y. This is
# only run by hand as yacc is not available in all environments.
# The name of the .c file is different than the name of the .y file
# so that make doesn't try to automatically regenerate the .c file.
+#---------------------------------------------------------------------
gendate:
bison --output-file=$(GENERICDIR)/tclDate.c \
@@ -864,15 +826,34 @@ $(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
+### be built as DLL objects. -Zl is used to avoid a dependency on any
### specific C run-time.
$(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c
$(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $?
+#---------------------------------------------------------------------
+# Generate the source dependencies. Having dependency rules will
+# improve incrimental build accuracy without having to resort to a
+# full rebuild just because some non-global header file like tclCompile.h
+# was changed. These rules aren't needed when building from scratch.
+#---------------------------------------------------------------------
+
+depend:
+!if !exist($(TCLSH))
+ @echo Build tclsh first!
+!else
+ $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
+ -passthru:"-DBUILD_tcl $(TCL_INCLUDES:"=""")" $(GENERICDIR),$$(GENERICDIR) \
+ $(COMPATDIR),$$(COMPATDIR) $(TOMMATHDIR),$$(TOMMATHDIR) $(WINDIR),$$(WINDIR) @<<
+$(TCLOBJS)
+<<
+!endif
+
+#" emacs fix
#---------------------------------------------------------------------
-# Dedependency rules
+# Dependency rules
#---------------------------------------------------------------------
$(GENERICDIR)\regcomp.c: \
@@ -1040,6 +1021,8 @@ install-libraries: tclConfig install-msgs install-tzdata
@$(CPY) "$(ROOT)\library\encoding\*.enc" \
"$(SCRIPT_INSTALL_DIR)\encoding\"
+#" emacs fix
+
install-tzdata:
@echo Installing time zone data
@set TCL_LIBRARY=$(ROOT)/library