From 24b65fbe41afddbd86e64d6a7459d46144fe246b Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sat, 30 Sep 2017 08:34:31 +0000 Subject: Added MAKEEXTCMD macro. Fixed couple of syntax errors when building extensions. --- win/rules.vc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index 5a5883b..75919d2 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -906,7 +906,7 @@ TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" !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 @@ -1225,7 +1225,13 @@ 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) +MAKEEXTCMD = $(MAKELIBCMD) +!else +MAKEEXTCMD = $(MAKEDLLCMD) +!endif MAKECONCMD = $(link32) $(conlflags) -out:$@ $(baselibs) $(tcllibs) MAKEGUICMD = $(link32) $(guilflags) -out:$@ $(baselibs) $(tcllibs) MAKERESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \ @@ -1315,9 +1321,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) -- cgit v0.12