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/rules.vc | |
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/rules.vc')
-rw-r--r-- | win/rules.vc | 16 |
1 files changed, 11 insertions, 5 deletions
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)
|