summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-09-30 06:20:33 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-09-30 06:20:33 (GMT)
commit457587f033b206475f695919961b1e2e83ecfc2f (patch)
treefb3f6e7afc2979f720a9c6687753ffe473876228 /win/rules.vc
parent78cf38319762a590b74fbe99f1802584e73e9db3 (diff)
downloadtcl-457587f033b206475f695919961b1e2e83ecfc2f.zip
tcl-457587f033b206475f695919961b1e2e83ecfc2f.tar.gz
tcl-457587f033b206475f695919961b1e2e83ecfc2f.tar.bz2
Added standard macros LIBDIR and DEMODIR. Also set common Tk related names and paths
Diffstat (limited to 'win/rules.vc')
-rw-r--r--win/rules.vc55
1 files changed, 36 insertions, 19 deletions
diff --git a/win/rules.vc b/win/rules.vc
index 973cef9..5a5883b 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -135,6 +135,16 @@ GENERICDIR = $(ROOT)\generic
!ifndef TOOLSDIR
TOOLSDIR = $(ROOT)\tools
!endif
+!ifndef LIBDIR
+LIBDIR = $(ROOT)\library
+!endif
+!ifndef DEMODIR
+!if exist("$(LIBDIR)\demos")
+DEMODIR = $(LIBDIR)\demos
+!else
+DEMODIR = $(ROOT)\demos
+!endif
+!endif # ifndef DEMODIR
# Do NOT enclose WINDIR in a !ifndef because Windows always defines
# WINDIR env var to point to c:\windows!
# TBD - This is a potentially dangerous conflict, rename WINDIR to
@@ -938,37 +948,36 @@ TCLSH_NATIVE = $(TCLSH)
!endif
# Do the same for Tk and Tk extensions that require the Tk libraries
-!if "$(PROJECT)" == "tk"
-
+!if "$(PROJECT)" == "tk" || defined(PROJECT_REQUIRES_TK)
WISHNAMEPREFIX = wish
-WISH = $(OUT_DIR)\$(WISHNAMEPREFIX)$(TK_VERSION)$(SUFX).exe
-TKSTUBLIBNAME = $(STUBPREFIX)$(TK_VERSION).lib
-TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
-TKIMPLIB = $(OUT_DIR)\$(PROJECT)$(TK_VERSION)$(SUFX).lib
+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"
+WISH = $(OUT_DIR)\$(WISHNAME)
+TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
+TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
TKLIB = $(OUT_DIR)\$(TKLIBNAME)
TK_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)"
-!elseif defined(PROJECT_REQUIRES_TK)
+!else # effectively PROJECT_REQUIRES_TK
!if $(TKINSTALL) # Building against installed Tk
-
-WISH = $(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe
-TKSTUBLIB = $(_TKDIR)\lib\tkstub$(TK_VERSION).lib
-TKIMPLIB = $(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib
+WISH = $(_TKDIR)\bin\$(WISHNAME)
+TKSTUBLIB = $(_TKDIR)\lib\$(TKSTUBLIBNAME)
+TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
TK_INCLUDES = -I"$(_TKDIR)\include"
-
!else # Building against Tk sources
-
-WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe
-TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib
-TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib
+WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME)
+TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME)
+TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
-
!endif # TKINSTALL
-!endif # PROJECT_REQUIRES_TK
-
+!endif # $(PROJECT) == tk
+!endif # $(PROJECT) == tk || PROJECT_REQUIRES_TK
###################################################################
# 11. Construct the paths for the installation directories
@@ -978,6 +987,9 @@ TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
# DOC_INSTALL_DIR - where documentation should be installed
# SCRIPT_INSTALL_DIR - where scripts should be installed
# INCLUDE_INSTALL_DIR - where C include files should be installed
+# 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"
LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
@@ -987,14 +999,19 @@ SCRIPT_INSTALL_DIR = $(_INSTALLDIR)\lib\$(PROJECT)$(TCL_MAJOR_VERSION).$(TCL_MIN
!else
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
+
PRJ_INSTALL_DIR = $(_INSTALLDIR)\$(PROJECT)$(DOTVERSION)
LIB_INSTALL_DIR = $(PRJ_INSTALL_DIR)
BIN_INSTALL_DIR = $(PRJ_INSTALL_DIR)
DOC_INSTALL_DIR = $(PRJ_INSTALL_DIR)
SCRIPT_INSTALL_DIR = $(PRJ_INSTALL_DIR)
+DEMO_INSTALL_DIR = $(PRJ_INSTALL_DIR)\demos
INCLUDE_INSTALL_DIR = $(_TCLDIR)\include
+
!endif
###################################################################