summaryrefslogtreecommitdiffstats
path: root/win/rules-ext.vc
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-11-15 07:54:08 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-11-15 07:54:08 (GMT)
commitca86fd3219bf704113fa6abac8e5393fdbd38ca9 (patch)
tree14f02612cf69b884c2f97650df7d0425e52641f4 /win/rules-ext.vc
parentc7530621ad6451c1adfa3908a9019e7dd24e042a (diff)
downloadtcl-ca86fd3219bf704113fa6abac8e5393fdbd38ca9.zip
tcl-ca86fd3219bf704113fa6abac8e5393fdbd38ca9.tar.gz
tcl-ca86fd3219bf704113fa6abac8e5393fdbd38ca9.tar.bz2
Added default-install-stubs target.
Make presence of nmake support files in extension directory optional (except for rules-ext.vc). This requires them to only build against a Tcl with the new nmake build system.
Diffstat (limited to 'win/rules-ext.vc')
-rw-r--r--win/rules-ext.vc24
1 files changed, 14 insertions, 10 deletions
diff --git a/win/rules-ext.vc b/win/rules-ext.vc
index e0a363c..7de6055 100644
--- a/win/rules-ext.vc
+++ b/win/rules-ext.vc
@@ -1,10 +1,5 @@
-#------------------------------------------------------------- -*- makefile -*-
-# rules-ext.vc --
-#
-# Part of the nmake based build system for Tcl and its extensions.
# This file should only be included in makefiles for Tcl extensions,
# NOT in the makefile for Tcl itself.
-# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for docs.
!ifndef _RULES_EXT_VC
@@ -48,10 +43,13 @@ _RULESDIR = .
!endif
!if "$(_RULESDIR)" != "."
-# Potentially using Tcl's support files. Need to compare the versions.
-# We extract version numbers using the nmakehlp program. For this
-# purpose, we use the version of nmakehlp that we have.
-!if [$(CC) -nologo nmakehlp.c -link -subsystem:console > nul]
+# Potentially using Tcl's support files. If this extension has its own
+# nmake support files, need to compare the versions and pick newer.
+
+!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] \
@@ -73,7 +71,9 @@ _RULESDIR = .
_RULESDIR = .
!endif
-!endif # $(_RULESDIR) != "."
+!endif # if exist("rules.vc")
+
+!endif # if $(_RULESDIR) != "."
# Let rules.vc know what copy of nmakehlp.c to use.
NMAKEHLPC = $(_RULESDIR)\nmakehlp.c
@@ -84,7 +84,11 @@ NMAKEHLPC = $(_RULESDIR)\nmakehlp.c
!undef OUR_RULES_MAJOR
!undef OUR_RULES_MINOR
+!if exist("$(_RULESDIR)\rules.vc")
!message *** Using $(_RULESDIR)\rules.vc
!include "$(_RULESDIR)\rules.vc"
+!else
+!error *** Could not locate rules.vc
+!endif
!endif # _RULES_EXT_VC \ No newline at end of file