Index: makefile.vc
===================================================================
RCS file: /cvsroot/tcl/tcl/win/makefile.vc,v
retrieving revision 1.124
diff -u -r1.124 makefile.vc
--- makefile.vc	3 Mar 2004 10:47:22 -0000	1.124
+++ makefile.vc	4 Mar 2004 16:25:38 -0000
@@ -17,7 +17,7 @@
 
 !if "$(MSDEVDIR)" == ""
 MSG = ^
-You'll need to run vcvars32.bat from Developer Studio, first, to setup^
+You will need to run vcvars32.bat from Developer Studio, first, to setup^
 the environment.  Jump to this line to read the new instructions.
 !error $(MSG)
 !endif
@@ -179,7 +179,7 @@
 DOTVERSION	= 9.0
 !elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 0
 MSG =^
-Can't get version string from ../generic/tcl.h
+Cant get version string from ../generic/tcl.h
 !error $(MSG)
 !endif
 VERSION = $(DOTVERSION:.=)
@@ -453,11 +453,11 @@
 # Project specific targets
 #---------------------------------------------------------------------
 
-release:    setup $(TCLSH) $(TCLSTUBLIB) dlls
-core:	    setup $(TCLLIB) $(TCLSTUBLIB)
-shell:	    setup $(TCLSH)
+release:    setup $(TCLSH) $(TCLSTUBLIB) dlls tclConfig
+core:	    setup $(TCLLIB) $(TCLSTUBLIB) tclConfig
+shell:	    setup $(TCLSH) tclConfig
 dlls:	    setup $(TCLPIPEDLL) $(TCLREGLIB) $(TCLDDELIB)
-all:	    setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) 
+all:	    setup $(TCLSH) $(TCLSTUBLIB) dlls tclConfig $(CAT32) 
 tcltest:    setup $(TCLTEST) dlls $(CAT32)
 install:    install-binaries install-libraries install-docs
 
@@ -785,6 +785,7 @@
 !endif
 	@echo installing $(TCLSTUBLIBNAME)
 	@$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
+	@$(CPY) "$(OUT_DIR)\tclConfig.sh" "$(LIB_INSTALL_DIR)\"
 
 install-libraries:
 	@echo installing http1.0
@@ -835,6 +836,76 @@
 	@$(CPY) "$(ROOT)\library\word.tcl"     "$(SCRIPT_INSTALL_DIR)\"
 	@$(CPY) "$(ROOT)\library\auto.tcl"     "$(SCRIPT_INSTALL_DIR)\"
 
+tclConfig:
+!if !exist($(TCLSH))
+	@echo Build tclsh first!
+!else
+	@echo Creating tclConfig.sh
+        @$(TCLSH) <<
+        set debug $(DEBUG)
+        set thread $(TCL_THREADS)
+        set static $(STATIC_BUILD)
+	set config(@TCL_DLL_FILE@)       {$(TCLLIBNAME)}
+	set config(@TCL_VERSION@)        [info tcl]
+	set config(@TCL_MAJOR_VERSION@)  [lindex [split [info tclversion] .] 0]
+	set config(@TCL_MINOR_VERSION@)  [lindex [split [info tclversion] .] 1]
+	set config(@TCL_PATCH_LEVEL@)    [string range [info patchlevel] [string length [info tclversion]] end]
+	set config(@CC@)                 {$(CC)}
+	set config(@DEFS@)               {}
+	if {$$static} {lappend config(@DEFS@) "-DSTATIC_BUILD=1"}
+	if {$$thread} {lappend config(@DEFS@) "-DTHREAD=1"}
+	set config(@TCL_DBGX@)           {$(DBGX)}
+	set config(@CFLAGS_DEBUG@)       {-nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MDd}
+	set config(@CFLAGS_OPTIMIZE@)    {-nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MD}
+	set config(@LDFLAGS_DEBUG@)      {-nologo -machine:$(MACHINE) -debug:full -debugtype:cv}
+	set config(@LDFLAGS_OPTIMIZE@)   {-nologo -machine:$(MACHINE) -release -opt:ref -opt:icf,3}
+	set config(@TCL_SHARED_BUILD@)   [expr {$$static ? 0 : 1}]
+	set config(@TCL_LIB_FILE@)       {$(PROJECT)$(VERSION)$(SUFX).lib}
+	set config(@TCL_NEEDS_EXP_FILE@) {}
+	set config(@CFG_TCL_EXPORT_FILE_SUFFIX@) {$${NODOT_VERSION}$${DBGX}.lib}
+	set config(@LIBS@)               {$(baselibs)}
+	set config(@prefix@)             {$(_INSTALLDIR)}
+	set config(@exec_prefix@)        {$(BIN_INSTALL_DIR)}
+	set config(@SHLIB_CFLAGS@)       {}
+	set config(@STLIB_CFLAGS@)       {}
+	set config(@CFLAGS_WARNING@)     {-W3}
+	set config(@EXTRA_CFLAGS@)       {-YX}
+	set config(@SHLIB_LD@)           {$(link32) $(dlllflags)}
+        set config(@STLIB_LD@)           {$(lib32) -nologo}
+	set config(@SHLIB_LD_LIBS@)      {$(baselibs)}
+	set config(@SHLIB_SUFFIX@)       {.dll}
+	set config(@DL_LIBS@)            {}
+	set config(@LDFLAGS@)            {}
+	set config(@TCL_LD_SEARCH_FLAGS@) {}
+	set config(@LIBOBJS@)            {}
+	set config(@RANLIB@)             {}
+	set config(@TCL_LIB_FLAG@)       {}
+	set config(@TCL_BUILD_LIB_SPEC@) {}
+	set config(@TCL_LIB_SPEC@)       {$(LIB_INSTALL_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib}
+	set config(@TCL_INCLUDE_SPEC@)   {-I$(INCLUDE_INSTALL_DIR)}
+	set config(@TCL_LIB_VERSIONS_OK@)  {}
+	set config(@CFG_TCL_SHARED_LIB_SUFFIX@) {$${NODOT_VERSION}$${DBGX}.dll}
+	set config(@CFG_TCL_UNSHARED_LIB_SUFFIX@) {$${NODOT_VERSION}$${DBGX}.lib}
+	set config(@TCL_SRC_DIR@)        [file nativename [file normalize {$(ROOT)}]]
+	set config(@TCL_PACKAGE_PATH@)   {}
+	set config(@TCL_STUB_LIB_FILE@)   {$(TCLSTUBLIBNAME)}
+	set config(@TCL_STUB_LIB_FLAG@)  {$(TCLSTUBLIBNAME)}
+	set config(@TCL_BUILD_STUB_LIB_SPEC@) "-L[file nativename [file normalize {$(OUT_DIR)}]] $(TCLSTUBLIBNAME)"
+	set config(@TCL_STUB_LIB_SPEC@)  {-L$(LIB_INSTALL_DIR) $(TCLSTUBLIBNAME)}
+	set config(@TCL_BUILD_STUB_LIB_PATH@) [file nativename [file normalize {$(TCLSTUBLIB)}]]
+	set config(@TCL_STUB_LIB_PATH@) [file nativename [file normalize {$(LIB_INSTALL_DIR)\\$(TCLSTUBLIBNAME)}]]
+	set config(@TCL_THREADS@)       {$(TCL_THREADS)}
+	set f [open tclConfig.sh.in r]
+        set data [read $$f]
+        close $$f
+	foreach {anchor subst} [array get config] {
+	   regsub -all $$anchor $$data $$subst data
+	}
+	set f [open [file join [file normalize {$(OUT_DIR)}] tclConfig.sh] w]
+        puts $$f $$data
+        close $$f
+<<
+!endif
 
 #---------------------------------------------------------------------
 # Clean up
