summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-11-07 16:53:32 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-11-07 16:53:32 (GMT)
commit4499c71658a794dea442302083be37dddfc6a061 (patch)
tree18e5cd1820fb531444ce247a57e36242b77ea22c /win
parent14e12f7e19a8139df7ad533b092914e268693337 (diff)
downloadtk-4499c71658a794dea442302083be37dddfc6a061.zip
tk-4499c71658a794dea442302083be37dddfc6a061.tar.gz
tk-4499c71658a794dea442302083be37dddfc6a061.tar.bz2
Fix inclusion of custom resource files to match TIP spec
Diffstat (limited to 'win')
-rw-r--r--win/makefile.vc4
-rw-r--r--win/rules.vc14
2 files changed, 13 insertions, 5 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index d2df135..832b705 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -76,10 +76,14 @@
# The PROJECT macro is used by rules.vc for generating appropriate
# macros and rules.
PROJECT = tk
+
# Default target to build if no target is specified. If unspecified, the
# rules.vc file will set up "all" as the target.
DEFAULT_BUILD_TARGET = release
+# We have a custom resource file
+RCFILE = tk.rc
+
# The rules.vc file does much of the hard work in terms of defining
# the build configuration, macros, output directories etc.
!include "rules-ext.vc"
diff --git a/win/rules.vc b/win/rules.vc
index 1289aec..a1c30e0 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -196,6 +196,7 @@ DEMODIR = $(ROOT)\demos
# TBD - This is a potentially dangerous conflict, rename WINDIR to
# something else
WINDIR = $(ROOT)\win
+
!ifndef RCDIR
!if exist("$(WINDIR)\rc")
RCDIR = $(WINDIR)\rc
@@ -1105,8 +1106,8 @@ PRJSTUBLIB = $(OUT_DIR)\$(PRJSTUBLIBNAME)
# If extension parent makefile has not defined a resource definition file,
# we will generate one from standard template.
!if !$(DOING_TCL) && !$(DOING_TK) && !$(STATIC_BUILD)
-!ifdef PRJ_RCFILE
-RESFILE = $(TMP_DIR)\$(PRJ_RCFILE:.rc=.res)
+!ifdef RCFILE
+RESFILE = $(TMP_DIR)\$(RCFILE:.rc=.res)
!else
RESFILE = $(TMP_DIR)\$(PROJECT).res
!endif
@@ -1498,10 +1499,13 @@ default-shell: default-setup $(PROJECT)
$(DEBUGGER) $(TCLSH)
# Generation of Windows version resource
-!ifdef PRJ_RCFILE
+!ifdef RCFILE
+# Note: don't use $** in below rule because there may be other dependencies
+# and only the "master" rc must be passed to the resource compiler
$(TMP_DIR)\$(PROJECT).res: $(RCDIR)\$(PROJECT).rc
- $(RESCMD) $**
+ $(RESCMD) $(RCDIR)\$(PROJECT).rc
+
!else
# If parent makefile has not defined a resource definition file,
@@ -1544,7 +1548,7 @@ END
<<
-!endif # ifdef PRJ_RCFILE
+!endif # ifdef RCFILE
!ifndef DISABLE_IMPLICIT_RULES
DISABLE_IMPLICIT_RULES = 0