diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2017-09-30 14:11:08 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2017-09-30 14:11:08 (GMT) |
commit | 01201582b7a72ee2efbb6d431ef8f02becd562f1 (patch) | |
tree | 6de711b6f4a63a3b714f77c64cbb11c11d3d84fb /win | |
parent | 24b65fbe41afddbd86e64d6a7459d46144fe246b (diff) | |
download | tcl-01201582b7a72ee2efbb6d431ef8f02becd562f1.zip tcl-01201582b7a72ee2efbb6d431ef8f02becd562f1.tar.gz tcl-01201582b7a72ee2efbb6d431ef8f02becd562f1.tar.bz2 |
Fix initialization of _TCLDIR and use MAKE*CMD macros in makefile.vc
Fixed initialization of _TCLDIR when it is not defined by caller when
building an extension. _INSTALLDIR is modified AFTER it is used to
initialize _TCLDIR. However, nmake expands late so we have to init
_TCLDIR relative to the *modified* _INSTALLDIR.
Diffstat (limited to 'win')
-rw-r--r-- | win/makefile.vc | 22 | ||||
-rw-r--r-- | win/rules.vc | 16 |
2 files changed, 16 insertions, 22 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index a32549b..9bd91f5 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -503,25 +503,15 @@ runshell: setup $(TCLSH) dlls set TCL_LIBRARY=$(ROOT:\=/)/library
$(DEBUGGER) $(TCLSH) $(SCRIPT)
-setup:
- @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
- @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
-
!if !$(STATIC_BUILD)
$(TCLIMPLIB): $(TCLLIB)
!endif
$(TCLLIB): $(TCLOBJS)
-!if $(STATIC_BUILD)
- $(MAKELIBCMD) @<<
-$**
-<<
-!else
- $(MAKEDLLCMD) @<<
+ $(MAKEBINCMD) @<<
$**
<<
$(_VC_MANIFEST_EMBED_DLL)
-!endif
$(TCLSTUBLIB): $(TCLSTUBOBJS)
$(MAKELIBCMD) -nodefaultlib $(TCLSTUBOBJS)
@@ -536,21 +526,19 @@ $(TCLTEST): $(TCLTESTOBJS) $(TCLSTUBLIB) $(TCLIMPLIB) !if $(STATIC_BUILD)
$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj
- $(MAKELIBCMD) $**
!else
$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB)
- $(MAKEDLLCMD) $**
- $(_VC_MANIFEST_EMBED_DLL)
!endif
+ $(MAKEBINCMD) $**
+ $(_VC_MANIFEST_EMBED_DLL)
!if $(STATIC_BUILD)
$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj
- $(MAKELIBCMD) $**
!else
$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB)
- $(MAKEDLLCMD) $**
- $(_VC_MANIFEST_EMBED_DLL)
!endif
+ $(MAKEBINCMD) $**
+ $(_VC_MANIFEST_EMBED_DLL)
pkgs:
@for /d %d in ($(PKGSDIR)\*) do \
diff --git a/win/rules.vc b/win/rules.vc index 75919d2..f62be5c 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -213,9 +213,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
@@ -1228,9 +1230,9 @@ MAKELIBCMD = $(lib32) -nologo $(LINKERFLAGS) -out:$@ MAKEDLLCMD = $(link32) $(dlllflags) -out:$@ $(baselibs) $(tcllibs)
!if $(STATIC_BUILD)
-MAKEEXTCMD = $(MAKELIBCMD)
+MAKEBINCMD = $(MAKELIBCMD)
!else
-MAKEEXTCMD = $(MAKEDLLCMD)
+MAKEBINCMD = $(MAKEDLLCMD)
!endif
MAKECONCMD = $(link32) $(conlflags) -out:$@ $(baselibs) $(tcllibs)
MAKEGUICMD = $(link32) $(guilflags) -out:$@ $(baselibs) $(tcllibs)
@@ -1249,6 +1251,10 @@ DEFAULT_BUILD_TARGET = all default_target: $(DEFAULT_BUILD_TARGET)
+setup:
+ @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+ @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
+
clean:
@echo Cleaning $(TMP_DIR)\* ...
@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
|