summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2017-11-07 16:47:35 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2017-11-07 16:47:35 (GMT)
commitc7530621ad6451c1adfa3908a9019e7dd24e042a (patch)
tree9587ae23aa39020b886be4b562c26462e647146c
parent2318b70929448012d0488f26c5fc85fa1251aa41 (diff)
downloadtcl-c7530621ad6451c1adfa3908a9019e7dd24e042a.zip
tcl-c7530621ad6451c1adfa3908a9019e7dd24e042a.tar.gz
tcl-c7530621ad6451c1adfa3908a9019e7dd24e042a.tar.bz2
Fix inclusion of custom resource files to match TIP spec
-rw-r--r--win/makefile.vc2
-rw-r--r--win/rules.vc21
2 files changed, 13 insertions, 10 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index d7ea7ae..ff31e96 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -72,7 +72,7 @@ PROJECT = tcl
DEFAULT_BUILD_TARGET = release
# We want to use our own resource file, not the standard template one.
-PRJ_RCFILE = tcl.rc
+RCFILE = tcl.rc
# The rules.vc file does most of the hard work in terms of defining
# the build configuration, macros, output directories etc.
diff --git a/win/rules.vc b/win/rules.vc
index 5e98d77..a1c30e0 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -117,7 +117,6 @@ Visual C++ compiler environment not initialized.
#----------------------------------------------------------
RMDIR = rmdir /S /Q
-ERRNULL = 2>NUL
CPY = xcopy /i /y >NUL
CPYDIR = xcopy /e /i /y >NUL
COPY = copy /y >NUL
@@ -197,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
@@ -388,7 +388,7 @@ VCVER=0
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
&& ![echo ARCH=AMD64 >> vercl.x] \
&& ![echo $(_HASH)endif >> vercl.x] \
- && ![$(cc32) -nologo -TC -P vercl.x $(ERRNULL)]
+ && ![$(cc32) -nologo -TC -P vercl.x 2>NUL]
!include vercl.i
!if $(VCVERSION) < 1900
!if ![echo VCVER= ^\> vercl.vc] \
@@ -402,7 +402,7 @@ VCVER = $(VCVERSION)
!endif
!endif
-!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!if ![del 2>NUL /q/f vercl.x vercl.i vercl.vc]
!endif
#----------------------------------------------------------------
@@ -829,7 +829,7 @@ WARNINGS = $(WARNINGS) -Wp64
################################################################
# 9. Extract various version numbers
-# For Tcl and Tk, version numbers are exctracted from tcl.h and tk.h
+# For Tcl and Tk, version numbers are extracted from tcl.h and tk.h
# respectively. For extensions, versions are extracted from the
# configure.in or configure.ac from the TEA configuration if it
# exists, and unset otherwise.
@@ -1106,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
@@ -1499,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,
@@ -1545,7 +1548,7 @@ END
<<
-!endif # ifdef PRJ_RCFILE
+!endif # ifdef RCFILE
!ifndef DISABLE_IMPLICIT_RULES
DISABLE_IMPLICIT_RULES = 0