Tcl Source Code

Artifact [db0a5fbfa6]
Login

Artifact db0a5fbfa6c550e8d09596e1352393dc6d35fcd5:

Attachment "vcbuild.patch" to ticket [533862ffff] added by mefy 2002-03-26 13:26:39.
Index: win/makefile.vc
===================================================================
RCS file: /cvsroot/tcl/tcl/win/makefile.vc,v
retrieving revision 1.83
diff -u -r1.83 makefile.vc
--- win/makefile.vc	21 Feb 2002 22:00:58 -0000	1.83
+++ win/makefile.vc	26 Mar 2002 06:23:26 -0000
@@ -418,10 +418,8 @@
 !endif
 
 setup:
-	@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) &\
-		echo *** Created directory '$(OUT_DIR)'
-	@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR) &\
-		echo *** Created directory '$(TMP_DIR)'
+	@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
+	@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
 
 !if !$(STATIC_BUILD)
 $(TCLIMPLIB): $(TCLLIB)
Index: win/rules.vc
===================================================================
RCS file: /cvsroot/tcl/tcl/win/rules.vc,v
retrieving revision 1.6
diff -u -r1.6 rules.vc
--- win/rules.vc	21 Feb 2002 18:37:27 -0000	1.6
+++ win/rules.vc	26 Mar 2002 06:23:26 -0000
@@ -37,13 +37,15 @@
 #----------------------------------------------------------
 
 ### Just display the compiler and linker versions to the output
-!if [$(cc32) 2>&1 | find "(R)"]
+!if [redir -eo $(cc32) | find "(R)"]
 !endif
-!if [$(link32) 2>&1 | find "(R)"]
+!if [redir -eo $(link32) | find "(R)"]
 !endif
 
 ### test for optimizations
-!if [$(cc32) -Ox -nologo -c -Zs -TC -Fdtemp nul 2>&1 | find "D4002" > nul]
+!if [redir -o temp.txt -eo $(cc32) -Ox -nologo -c -Zs -TC -Fdtemp nul]
+!endif
+!if [redir -o nul -eo find "D4002" temp.txt]
 !message *** Compiler has 'Optimizations'
 OPTIMIZING	= 1
 !else
@@ -53,14 +55,18 @@
 
 ### test for pentium errata
 !if "$(MACHINE)" == "IX86"
-!if [$(cc32) -QI0f -nologo -c -Zs -TC -Fdtemp nul 2>&1 | find "D4002" > nul]
+!if [redir -o temp.txt -eo $(cc32) -QI0f -nologo -c -Zs -TC -Fdtemp nul]
+!endif
+!if [redir -o nul -eo find "D4002" temp.txt]
 !message *** Compiler has 'Pentium 0x0f fix'
 PENT_0F_ERRATA	= 1
 !else
 !message *** Compiler doesn't have 'Pentium 0x0f fix'
 PENT_0F_ERRATA	= 0
 !endif
-!if [$(link32) -nologo -opt:nowin98 2>&1 | find "LNK1117" > nul]
+!if [redir -o temp.txt -eo $(link32) -nologo -opt:nowin98]
+!endif
+!if [redir -o nul -eo find "LNK1117" temp.txt]
 !message *** Linker has 'Win98 alignment problem'
 ALIGN98_HACK	= 1
 !else
@@ -74,7 +80,9 @@
 
 ### test for Itanium errata
 !if "$(MACHINE)" == "IA64"
-!if [$(cc32) -QIA64_Bx -nologo -c -Zs -TC -Fdtemp nul 2>&1 | find "D4002" > nul]
+!if [redir -o temp.txt -eo $(cc32) -QIA64_Bx -nologo -c -Zs -TC -Fdtemp nul]
+!endif
+!if ![redir -o nul -eo find "D4002" temp.txt]
 !message *** Compiler has 'B-stepping errata workarounds'
 ITAN_B_ERRATA	= 1
 !else
@@ -86,7 +94,9 @@
 !endif
 
 ### Clean-up temp files after tests.
-!if [@for %d in (temp.idb temp.pdb) do @if exist %d del %d]
+!if [@if exist temp.idb del temp.idb]
+!endif
+!if [@if exist temp.pdb del temp.pdb]
 !endif
 
 
@@ -94,7 +104,10 @@
 # Decode the options requested.
 #----------------------------------------------------------
 
-!if "$(OPTS)" == "" || ![echo "$(OPTS)" | find /i "none" > nul]
+!if [echo "$(OPTS)" > temp.txt]
+!endif
+
+!if "$(OPTS)" == "" || ![redir -o nul -eo find /i "none" temp.txt]
 STATIC_BUILD	= 0
 TCL_THREADS	= 0
 DEBUG		= 0
@@ -103,43 +116,43 @@
 LOIMPACT	= 0
 TCL_LINKWITHEXTENSIONS	= 0
 !else
-!if ![echo $(OPTS) | find /i "static" > nul]
+!if ![redir -o nul -eo find /i "static" temp.txt]
 !message *** Doing static
 STATIC_BUILD	= 1
 !else
 STATIC_BUILD	= 0
 !endif
-!if ![echo $(OPTS) | find /i "msvcrt" > nul]
+!if ![redir -o nul -eo find /i "msvcrt" temp.txt]
 !message *** Doing msvcrt
 MSVCRT		= 1
 !else
 MSVCRT		= 0
 !endif
-!if ![echo $(OPTS) | find /i "linkexten" > nul]
+!if ![redir -o nul -eo find /i "linkexten" temp.txt]
 !message *** Doing linkexten
 TCL_LINKWITHEXTENSIONS	= 1
 !else
 TCL_LINKWITHEXTENSIONS	= 0
 !endif
-!if ![echo $(OPTS) | find /i "threads" > nul]
+!if ![redir -o nul -eo find /i "threads" temp.txt]
 !message *** Doing threads
 TCL_THREADS	= 1
 !else
 TCL_THREADS	= 0
 !endif
-!if ![echo $(OPTS) | find /i "symbols" > nul]
+!if ![redir -o nul -eo find /i "symbols" temp.txt]
 !message *** Doing symbols
 DEBUG		= 1
 !else
 DEBUG		= 0
 !endif
-!if ![echo $(OPTS) | find /i "profile" > nul]
+!if ![redir -o nul -eo find /i "profile" temp.txt]
 !message *** Doing profile
 PROFILE		= 1
 !else
 PROFILE		= 0
 !endif
-!if ![echo $(OPTS) | find /i "loimpact" > nul]
+!if ![redir -o nul -eo find /i "loimpact" temp.txt]
 !message *** Doing loimpact
 LOIMPACT	= 1
 !else
@@ -213,22 +226,28 @@
 # Decode the statistics requested.
 #----------------------------------------------------------
 
-!if "$(STATS)" == "" || ![echo "$(STATS)" | find /i "none" > nul]
+!if [echo "$(STATS)" > temp.txt]
+!endif
+
+!if "$(STATS)" == "" || ![redir -o nul -eo find /i "none" temp.txt]
 TCL_MEM_DEBUG	    = 0
 TCL_COMPILE_DEBUG   = 0
 !else
-!if ![echo $(STATS) | find /i "memdbg" > nul]
+!if ![redir -o nul -eo find /i "memdbg" temp.txt]
 !message *** Doing memdbg
 TCL_MEM_DEBUG	    = 1
 !else
 TCL_MEM_DEBUG	    = 0
 !endif
-!if ![echo $(STATS) | find /i "compdbg" > nul]
+!if ![redir -o nul -eo find /i "compdbg" temp.txt]
 !message *** Doing compdbg
 TCL_COMPILE_DEBUG   = 1
 !else
 TCL_COMPILE_DEBUG   = 0
 !endif
+!endif
+
+!if [@if exist temp.txt del temp.txt]
 !endif