summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-23 20:22:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-12-23 20:22:54 (GMT)
commit1dd89810eb1cba2b78eeeb42df4c3e966a55102e (patch)
tree413535e7568359e3d3fcffa581e1ab3c9b113412 /win/rules.vc
parent53795bd1990e95c19850746d2117171a40d7ceef (diff)
parentcae732bd8d781efd44d74b1db129d5969ca76182 (diff)
downloadtcl-1dd89810eb1cba2b78eeeb42df4c3e966a55102e.zip
tcl-1dd89810eb1cba2b78eeeb42df4c3e966a55102e.tar.gz
tcl-1dd89810eb1cba2b78eeeb42df4c3e966a55102e.tar.bz2
merge core-8-branch
Diffstat (limited to 'win/rules.vc')
-rw-r--r--win/rules.vc39
1 files changed, 34 insertions, 5 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 958c888..0dda1f1 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -24,7 +24,7 @@ _RULES_VC = 1
# For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 0
+RULES_VERSION_MINOR = 1
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -535,7 +535,6 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
-!message *** Using $(NMAKEHLPC)
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
@@ -590,7 +589,6 @@ FPOPTS = $(FPOPTS) -QI0f
OPTIMIZATIONS = $(FPOPTS)
!if [nmakehlp -c -O2]
-!message *** Compiler has 'Optimizations'
OPTIMIZING = 1
OPTIMIZATIONS = $(OPTIMIZATIONS) -O2
!else
@@ -1062,9 +1060,21 @@ TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)"
!if $(TCLINSTALL) # Building against an installed Tcl
+# When building extensions, we need to locate tclsh. Depending on version
+# of Tcl we are building against, this may or may not have a "t" suffix.
+# Try various possibilities in turn.
TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe
+!if !exist("$(TCLSH)")
+TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:t=).exe
+!endif
+
TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib
TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib
+# When building extensions, may be linking against Tcl that does not add
+# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
+!if !exist("$(TCLIMPLIB)")
+TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib
+!endif
TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib
@@ -1074,8 +1084,16 @@ TCL_INCLUDES = -I"$(_TCLDIR)\include"
!else # Building against Tcl sources
TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe
+!if !exist($(TCLSH))
+TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:t=).exe
+!endif
TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib
TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib
+# When building extensions, may be linking against Tcl that does not add
+# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
+!if !exist("$(TCLIMPLIB)")
+TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib
+!endif
TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib
@@ -1119,11 +1137,23 @@ TK_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)"
WISH = $(_TKDIR)\bin\$(WISHNAME)
TKSTUBLIB = $(_TKDIR)\lib\$(TKSTUBLIBNAME)
TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
+# When building extensions, may be linking against Tk that does not add
+# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
+!if !exist("$(TKIMPLIB)")
+TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
+TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
+!endif
TK_INCLUDES = -I"$(_TKDIR)\include"
!else # Building against Tk sources
WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME)
TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME)
TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
+# When building extensions, may be linking against Tk that does not add
+# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
+!if !exist("$(TKIMPLIB)")
+TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
+TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
+!endif
TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
!endif # TKINSTALL
tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)"
@@ -1681,7 +1711,6 @@ TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
!message *** Output directory will be '$(OUT_DIR)'
!message *** Installation, if selected, will be in '$(_INSTALLDIR)'
!message *** Suffix for binaries will be '$(SUFX)'
-!message *** Compiler version $(VCVER). Target machine is $(MACHINE)
-!message *** Host architecture is $(NATIVE_ARCH)
+!message *** Compiler version $(VCVER). Target $(MACHINE), host $(NATIVE_ARCH).
!endif # ifdef _RULES_VC