summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-10-07 13:56:38 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-10-07 13:56:38 (GMT)
commit1cd076233846d0150dcb8d78b3df424a781c4302 (patch)
treeeea6a15aca8de5c27c52db22a69c769c2a709a79 /win/rules.vc
parent7ec494337f8e505222b26495da9a7071dd493cdc (diff)
downloadtk-1cd076233846d0150dcb8d78b3df424a781c4302.zip
tk-1cd076233846d0150dcb8d78b3df424a781c4302.tar.gz
tk-1cd076233846d0150dcb8d78b3df424a781c4302.tar.bz2
Import latest VC compile rules from Tcl.
Primarily standard targets in targets.vc
Diffstat (limited to 'win/rules.vc')
-rw-r--r--win/rules.vc237
1 files changed, 187 insertions, 50 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 5a5883b..c0d2915 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1,4 +1,4 @@
-#------------------------------------------------------------------------------
+#------------------------------------------------------------- -*- makefile -*-
# rules.vc --
#
# Microsoft Visual C++ makefile include for decoding the commandline
@@ -15,12 +15,30 @@
!ifndef _RULES_VC
_RULES_VC = 1
+# The following macros define the version of the rules.vc nmake build system
+RULES_VERSION_MAJOR = 1
+RULES_VERSION_MINOR = 0
+
+# The PROJECT macro must be defined by parent makefile.
+# Also special case Tcl and Tk to save some typing later
+!ifndef PROJECT
+!error *** Error: Macro PROJECT not defined! Please define it before including rules.vc
+!endif
+DOING_TCL = 0
+DOING_TK = 0
+!if "$(PROJECT)" == "tcl"
+DOING_TCL = 1
+!elseif "$(PROJECT)" == "tk"
+DOING_TK = 1
+!endif
+
################################################################
# Nmake is a pretty weak environment in syntax and capabilities
# so this file is necessarily verbose. It's broken down into
# the following parts.
#
-# 0. Sanity check that compiler environment is set up.
+# 0. Sanity check that compiler environment is set up and initialize
+# any built-in settings from the parent makefile
# 1. First define the external tools used for compiling, copying etc.
# as this is independent of everything else.
# 2. Figure out our build structure in terms of the directory, whether
@@ -57,6 +75,14 @@ Visual C++ compiler environment not initialized.
!error $(MSG)
!endif
+# Defaults for built-in internal settings defined in parent makefile
+!ifndef DISABLE_STANDARD_TARGETS
+DISABLE_STANDARD_TARGETS = 0
+!endif
+!ifndef DISABLE_CLEAN_TARGETS
+DISABLE_CLEAN_TARGETS = 0
+!endif
+
################################################################
# 1. Define external programs being used
@@ -165,7 +191,7 @@ _INSTALLDIR = $(INSTALLDIR:/=\)
_INSTALLDIR = C:\Program Files\Tcl
!endif
-!if "$(PROJECT)" == "tcl"
+!if $(DOING_TCL)
# BEGIN Case 2(a) - Building Tcl itself
@@ -174,7 +200,7 @@ _TCL_H = ..\generic\tcl.h
# END Case 2(a) - Building Tcl itself
-!elseif "$(PROJECT)" == "tk"
+!elseif $(DOING_TK)
# BEGIN Case 2(b) - Building Tk
@@ -213,9 +239,11 @@ _TCL_H = $(_TCLDIR)\generic\tcl.h
!if exist("$(_INSTALLDIR)\include\tcl.h") # Case 2(c) for extensions with TCLDIR undefined
TCLINSTALL = 1
-TCLDIR = $(_INSTALLDIR)
-_TCLDIR = $(_INSTALLDIR)
-_TCL_H = $(_INSTALLDIR)\include\tcl.h
+TCLDIR = $(_INSTALLDIR)\..
+# NOTE: we will be resetting _INSTALLDIR to _INSTALLDIR/lib for extensions
+# later so the \.. accounts for the /lib
+_TCLDIR = $(_INSTALLDIR)\..
+_TCL_H = $(_TCLDIR)\include\tcl.h
!elseif exist("..\..\tcl\generic\tcl.h")
TCLINSTALL = 0
TCLDIR = ..\..\tcl
@@ -276,7 +304,7 @@ _INSTALLDIR=$(_INSTALLDIR)\lib
!endif
# END Case 2(c) or (d) - Building an extension
-!endif # if $(PROJECT) == "tcl"
+!endif # if $(DOING_TCL)
################################################################
# 3. Determine compiler version and architecture
@@ -389,15 +417,15 @@ CFG_ENCODING = \"cp1252\"
#
# Extensions built against Tcl sources will use the one from the Tcl source.
#
-# This can all be overridden by defining the NMAKEHLPC macro to point
-# to the nmakehlp.c file to be used, either from the command line or
-# the containing makefile.
+# When building an extension using a sufficiently new version of Tcl,
+# rules-ext.vc will define NMAKEHLPC appropriately to point to the
+# copy of nmakehlp.c to be used.
!ifndef NMAKEHLPC
# Default to the one in the current directory (the extension's own nmakehlp.c)
NMAKEHLPC = nmakehlp.c
-!if "$(PROJECT)" != "tcl"
+!if !$(DOING_TCL)
!if $(TCLINSTALL)
!if exist("$(_TCLDIR)\lib\nmake\nmakehlp.c")
NMAKEHLPC = $(_TCLDIR)\lib\nmake\nmakehlp.c
@@ -407,7 +435,7 @@ NMAKEHLPC = $(_TCLDIR)\lib\nmake\nmakehlp.c
NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
!endif
!endif # $(TCLINSTALL)
-!endif # $(PROJECT) != "tcl"
+!endif # !$(DOING_TCL)
!endif # NMAKEHLPC
@@ -568,7 +596,7 @@ TCL_USE_STATIC_PACKAGES = 0
USE_THREAD_ALLOC = 1
UNCHECKED = 0
CONFIG_CHECK = 1
-!if "$(PROJECT)" == "tcl"
+!if $(DOING_TCL)
USE_STUBS = 0
!else
USE_STUBS = 1
@@ -766,7 +794,11 @@ WARNINGS = $(WARNINGS) -Wp64
!endif
################################################################
-# 9. Extract various version numbers from tcl headers
+# 9. Extract various version numbers
+# For Tcl and Tk, version numbers are exctracted from tcl.h and tk.h
+# respectively. For extensions, versions are extracted from the
+# configure.in or configure.ac from the TEA configuration if it
+# exists, and unset otherwise.
# Sets the following macros:
# TCL_MAJOR_VERSION
# TCL_MINOR_VERSION
@@ -776,6 +808,8 @@ WARNINGS = $(WARNINGS) -Wp64
# TK_MINOR_VERSION
# TK_PATCH_LEVEL
# TK_VERSION
+# DOTVERSION - set as (for example) 2.5
+# VERSION - set as (for example 25)
#--------------------------------------------------------------
!if [echo REM = This file is generated from rules.vc > versions.vc]
@@ -805,10 +839,39 @@ WARNINGS = $(WARNINGS) -Wp64
!include versions.vc
TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
+TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
!if defined(_TK_H)
TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
+TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
+!endif
+
+# Set DOTVERSION and VERSION
+!if $(DOING_TCL)
+
+DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
+VERSION = $(TCL_VERSION)
+
+!elseif $(DOING_TK)
+
+DOTVERSION = $(TK_DOTVERSION)
+VERSION = $(TK_VERSION)
+
+!else # Doing a non-Tk extension
+
+# If parent makefile has not defined DOTVERSION, try to get it from TEA
+# first from a configure.in file, and then from configure.ac
+!ifndef DOTVERSION
+!if [echo DOTVERSION = \> versions.vc] \
+ || [nmakehlp -V ..\configure.in AC_INIT >> versions.vc]
+!if [echo DOTVERSION = \> versions.vc] \
+ || [nmakehlp -V ..\configure.ac AC_INIT >> versions.vc]
+!error *** Could not figure out extension version. Please define DOTVERSION in parent makefile before including rules.vc.
+!endif
!endif
+!include versions.vc
+!endif # DOTVERSION
+!endif # $(DOING_TCL) ... etc.
################################################################
# 10. Construct output directory and file paths
@@ -828,10 +891,15 @@ TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
# is of the form {Release,Debug}[_AMD64][_COMPILERVERSION]
# TMP_DIR - directory where object files are created
# OUT_DIR - directory where output executables are created
-# STUBPREFIX - name of the stubs library for this project
# Both TMP_DIR and OUT_DIR are defaulted only if not defined by the
# parent makefile (or command line). The default values are
# based on BUILDDIRTOP.
+# STUBPREFIX - name of the stubs library for this project
+# PRJIMPLIB - output path of the generated project import library
+# PRJLIBNAME - name of generated project library
+# PRJLIB - output path of generated project library
+# PRJSTUBLIBNAME - name of the generated project stubs library
+# PRJSTUBLIB - output path of the generated project stubs library
SUFX = tsgx
@@ -889,7 +957,7 @@ OUT_DIR = $(TMP_DIR)
STUBPREFIX = $(PROJECT)stub
# Set up paths to various Tcl executables and libraries needed by extensions
-!if "$(PROJECT)" == "tcl"
+!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(TCL_VERSION)$(SUFX).exe
TCLSH = $(OUT_DIR)\$(TCLSHNAME)
@@ -901,12 +969,12 @@ TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME)
TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)"
-!else # $(PROJECT) is not "tcl"
+!else # ! $(DOING_TCL)
!if $(TCLINSTALL) # Building against an installed Tcl
TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe
-!if !exist($(TCLSH)) && $(TCL_THREADS)
+!if !exist("$(TCLSH)") && $(TCL_THREADS)
TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe
!endif
TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib
@@ -935,7 +1003,7 @@ TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
tcllibs = "$(TCLSTUBLIB)" "$(TCLIMPLIB)"
-!endif $(PROJECT) != "tcl"
+!endif # $(DOING_TCL)
# We need a tclsh that will run on the host machine as part of the build.
# IX86 runs on all architectures.
@@ -948,14 +1016,14 @@ TCLSH_NATIVE = $(TCLSH)
!endif
# Do the same for Tk and Tk extensions that require the Tk libraries
-!if "$(PROJECT)" == "tk" || defined(PROJECT_REQUIRES_TK)
+!if $(DOING_TK) || defined(PROJECT_REQUIRES_TK)
WISHNAMEPREFIX = wish
WISHNAME = $(WISHNAMEPREFIX)$(TK_VERSION)$(SUFX).exe
TKLIBNAME = $(PROJECT)$(TK_VERSION)$(SUFX).$(EXT)
TKSTUBLIBNAME = tkstub$(TK_VERSION).lib
TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX).lib
-!if "$(PROJECT)" == "tk"
+!if $(DOING_TK)
WISH = $(OUT_DIR)\$(WISHNAME)
TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
@@ -976,8 +1044,16 @@ TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
!endif # TKINSTALL
-!endif # $(PROJECT) == tk
-!endif # $(PROJECT) == tk || PROJECT_REQUIRES_TK
+!endif # $(DOING_TK)
+!endif # $(DOING_TK) || PROJECT_REQUIRES_TK
+
+# Various output paths
+PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
+PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
+PRJLIB = $(OUT_DIR)\$(PRJLIBNAME)
+
+PRJSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
+PRJSTUBLIB = $(OUT_DIR)\$(PRJSTUBLIBNAME)
###################################################################
# 11. Construct the paths for the installation directories
@@ -990,19 +1066,19 @@ TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
# DEMO_INSTALL_DIR - where demos should be installed
# PRJ_INSTALL_DIR - where package will be installed (not set for tcl and tk)
-!if "$(PROJECT)" == "tcl" || "$(PROJECT)" == "tk"
+!if $(DOING_TCL) || $(DOING_TK)
LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
DOC_INSTALL_DIR = $(_INSTALLDIR)\doc
-!if "$(PROJECT)" == "tcl"
+!if $(DOING_TCL)
SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
-!else
+!else # DOING_TK
SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
!endif
DEMO_INSTALL_DIR = $(SCRIPT_INSTALL_DIR)\demos
INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\include
-!else
+!else # extension other than Tk
PRJ_INSTALL_DIR = $(_INSTALLDIR)\$(PROJECT)$(DOTVERSION)
LIB_INSTALL_DIR = $(PRJ_INSTALL_DIR)
@@ -1059,7 +1135,7 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_NO_DEPRECATED
!if $(USE_STUBS)
# Note we do not define USE_TCL_STUBS even when building tk since some
# test targets in tk do not use stubs
-!if "$(PROJECT)" != "tcl"
+!if ! $(DOING_TCL)
USE_STUBS_DEFS = -DUSE_TCL_STUBS -DUSE_TCLOO_STUBS
!ifdef PROJECT_REQUIRES_TK
USE_STUBS_DEFS = $(USE_STUBS_DEFS) -DUSE_TK_STUBS
@@ -1083,9 +1159,32 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
!endif
-# UNICODE - Use the wide char Windows API.
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP
-COMPILERFLAGS = /DUNICODE /D_UNICODE /D_ATL_XP_TARGETING
+COMPILERFLAGS = /D_ATL_XP_TARGETING
+
+# Following is primarily for the benefit of extensions. Tcl 8.5 builds
+# Tcl without /DUNICODE, while 8.6 builds with it defined. When building
+# an extension, it is advisable (but not mandated) to use the same Windows
+# API as the Tcl build. This is accordingly defaulted below. A particular
+# extension can override this by pre-definining USE_WIDECHAR_API.
+!ifndef USE_WIDECHAR_API
+!if $(TCL_VERSION) > 85
+USE_WIDECHAR_API = 1
+!else
+USE_WIDECHAR_API = 0
+!endif
+!endif
+
+!if $(USE_WIDECHAR_API)
+COMPILERFLAGS = $(COMPILERFLAGS) /DUNICODE /D_UNICODE
+!endif
+
+# Like the TEA system only set this non empty for non-Tk extensions
+!if !$(DOING_TCL) && !$(DOING_TK)
+PKGNAMEFLAGS = -DPACKAGE_NAME="\"$(PROJECT)\"" \
+ -DPACKAGE_VERSION="\"$(DOTVERSION)\"" \
+ -DMODULE_SCOPE=extern
+!endif
# crt picks the C run time based on selected OPTS
!if $(MSVCRT)
@@ -1149,8 +1248,8 @@ cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\ $(cdebug)
appcflags = $(cflags) $(crt) $(TCL_INCLUDES) $(TK_INCLUDES) $(PRJ_INCLUDES) $(TCL_DEFINES) $(PRJ_DEFINES) $(OPTDEFINES) $(USE_STUBS_DEFS)
appcflags_nostubs = $(cflags) $(crt) $(TCL_INCLUDES) $(TK_INCLUDES) $(PRJ_INCLUDES) $(TCL_DEFINES) $(PRJ_DEFINES) $(OPTDEFINES)
-pkgcflags = $(appcflags) -DBUILD_$(PROJECT)
-pkgcflags_nostubs = $(appcflags_nostubs) -DBUILD_$(PROJECT)
+pkgcflags = $(appcflags) $(PKGNAMEFLAGS) -DBUILD_$(PROJECT)
+pkgcflags_nostubs = $(appcflags_nostubs) $(PKGNAMEFLAGS) -DBUILD_$(PROJECT)
# stubscflags contains $(cflags) plus flags used for building a stubs
# library for the package. Note: -DSTATIC_BUILD is defined in
@@ -1225,25 +1324,59 @@ baselibs = $(baselibs) ucrt.lib
# 3. Define standard commands, common make targets and implicit rules
MAKELIBCMD = $(lib32) -nologo $(LINKERFLAGS) -out:$@
-MAKEDLLCMD = $(link32) $(dlllflags) -out:$@ $(baselibs) $(tcllibs)
+MAKEDLLCMD = $(link32) $(dlllflags) -out:$@ $(baselibs) $(tcllibs)
+
+!if $(STATIC_BUILD)
+MAKEBINCMD = $(MAKELIBCMD)
+!else
+MAKEBINCMD = $(MAKEDLLCMD)
+!endif
MAKECONCMD = $(link32) $(conlflags) -out:$@ $(baselibs) $(tcllibs)
MAKEGUICMD = $(link32) $(guilflags) -out:$@ $(baselibs) $(tcllibs)
MAKERESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \
$(TCL_INCLUDES) \
- -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
- -d TCL_THREADS=$(TCL_THREADS) \
- -d STATIC_BUILD=$(STATIC_BUILD) \
+ -DDEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
+ -DTCL_THREADS=$(TCL_THREADS) \
+ -DSTATIC_BUILD=$(STATIC_BUILD) \
+ -DCOMMAVERSION=$(DOTVERSION:.=,),0 \
+ -DDOTVERSION=\"$(DOTVERSION)\" \
+ -DVERSION=\"$(VERSION)\" \
+ -DSUFX=\"$(SUFX)\" \
$<
-!ifndef DISABLE_DEFAULT_TARGETS
!ifndef DEFAULT_BUILD_TARGET
-DEFAULT_BUILD_TARGET = all
+DEFAULT_BUILD_TARGET = $(PROJECT)
!endif
-default_target: $(DEFAULT_BUILD_TARGET)
+default-target: $(DEFAULT_BUILD_TARGET)
-clean:
+default-pkgindex:
+ @echo package ifneeded $(PROJECT) $(DOTVERSION) \
+ [list load [file join $$dir $(PRJLIBNAME)]] >> $(OUT_DIR)\pkgIndex.tcl
+
+default-pkgindex-tea:
+ @if exist $(ROOT)\pkgIndex.tcl.in nmakehlp -s << $(ROOT)\pkgIndex.tcl.in > $(OUT_DIR)\pkgIndex.tcl
+@PACKAGE_VERSION@ $(DOTVERSION)
+@PACKAGE_NAME@ $(PROJECT)
+@PKG_LIB_FILE@ $(PRJLIBNAME)
+<<
+
+
+default-install: default-install-binaries default-install-libraries
+
+default-install-binaries: $(PRJLIB)
+ @echo Installing binaries to '$(SCRIPT_INSTALL_DIR)'
+ @if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
+ @$(CPY) $(PRJLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
+
+default-install-libraries: $(OUT_DIR)\pkgIndex.tcl
+ @echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
+ @if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
+ @echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
+ @$(CPY) $(OUT_DIR)\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)
+
+default-clean:
@echo Cleaning $(TMP_DIR)\* ...
@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
@echo Cleaning $(WINDIR)\nmakehlp.obj, nmakehlp.exe ...
@@ -1258,13 +1391,17 @@ clean:
@if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
@if exist $(WINDIR)\version.vc del $(WINDIR)\version.vc
-realclean: hose
-
-hose:
+default-hose:
@echo Hosing $(OUT_DIR)\* ...
@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
-!endif
+default-distclean: default-hose
+ @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
+ @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
+
+default-setup:
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
!ifndef DISABLE_IMPLICIT_RULES
# Implicit rule definitions - only for building library objects. For stubs and
@@ -1287,7 +1424,7 @@ $<
{$(RCDIR)}.rc{$(TMP_DIR)}.res:
$(MAKERESCMD)
-
+
{$(WINDIR)}.rc{$(TMP_DIR)}.res:
$(MAKERESCMD)
@@ -1301,7 +1438,7 @@ $<
# When building an extension, certain configuration options should
# match the ones used when Tcl was built. Here we check and
# warn on a mismatch.
-!if "$(PROJECT)" != "tcl"
+!if ! $(DOING_TCL)
!if $(TCLINSTALL) # Building against an installed Tcl
!if exist("$(_TCLDIR)\lib\nmake\tcl.nmake")
@@ -1315,9 +1452,9 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
!if $(CONFIG_CHECK)
!ifdef TCLNMAKECONFIG
-!include $(TCLMAKECONFIG)
+!include $(TCLNMAKECONFIG)
-!if defined(CORE_MACHINE) && $(CORE_MACHINE) != $(MACHINE)
+!if defined(CORE_MACHINE) && "$(CORE_MACHINE)" != "$(MACHINE)"
!error ERROR: Build target ($(MACHINE)) does not match the Tcl library architecture ($(CORE_MACHINE)).
!endif
!if defined(CORE_USE_THREAD_ALLOC) && $(CORE_USE_THREAD_ALLOC) != $(USE_THREAD_ALLOC)
@@ -1330,7 +1467,7 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
!endif # TCLNMAKECONFIG
-!endif # $(PROJECT) == "tcl"
+!endif # ! $(DOING_TCL)
#----------------------------------------------------------