summaryrefslogtreecommitdiffstats
path: root/win/rules-ext.vc
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-12-13 10:03:54 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-12-13 10:03:54 (GMT)
commit48549d55b04fb4d2eb8df460ffac8ea552676073 (patch)
tree43b6daa62947b32fb107ad7919d4e7597215f610 /win/rules-ext.vc
parent8c866ee6be6f90cf26e2a1001319046bc2cd1bd6 (diff)
downloadtcl-48549d55b04fb4d2eb8df460ffac8ea552676073.zip
tcl-48549d55b04fb4d2eb8df460ffac8ea552676073.tar.gz
tcl-48549d55b04fb4d2eb8df460ffac8ea552676073.tar.bz2
Updated nmake system to make use of the new nmakehlp -L option for
locating dependencies.
Diffstat (limited to 'win/rules-ext.vc')
-rw-r--r--win/rules-ext.vc19
1 files changed, 14 insertions, 5 deletions
diff --git a/win/rules-ext.vc b/win/rules-ext.vc
index 3aba80d..58c70fa 100644
--- a/win/rules-ext.vc
+++ b/win/rules-ext.vc
@@ -28,6 +28,12 @@ macro to the name of the project makefile.
!error The rules-ext.vc file is not intended for Tcl itself.
!endif
+# We extract version numbers using the nmakehlp program. For now use
+# the local copy of nmakehlp. Once we locate Tcl, we will use that
+# one if it is newer.
+!if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul]
+!endif
+
# First locate the Tcl directory that we are working with.
!ifdef TCLDIR
@@ -36,13 +42,20 @@ _RULESDIR = $(TCLDIR:/=\)
!else
# If an installation path is specified, that is also the Tcl directory.
-# Also, tk never builds against an installed Tcl, it needs Tcl sources
+# Also Tk never builds against an installed Tcl, it needs Tcl sources
!if defined(INSTALLDIR) && "$(PROJECT)" != "tk"
_RULESDIR=$(INSTALLDIR:/=\)
!else
+# Locate Tcl sources
+!if [echo _RULESDIR = \> nmakehlp.out] \
+ || [nmakehlp -L generic\tcl.h >> nmakehlp.out]
_RULESDIR = ..\..\tcl
+!else
+!include nmakehlp.out
!endif
+!endif # defined(INSTALLDIR)....
+
!endif # ifndef TCLDIR
# Now look for the targets.vc file under the Tcl root. Note we check this
@@ -63,10 +76,6 @@ _RULESDIR = .
!if exist("rules.vc") # The extension has its own copy
-# We extract version numbers using the nmakehlp program.
-!if [$(CC) -nologo "$(_RULESDIR)\nmakehlp.c" -link -subsystem:console > nul]
-!endif
-
!if [echo TCL_RULES_MAJOR = \> versions.vc] \
&& [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MAJOR >> versions.vc]
!endif