diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-08-15 13:18:43 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-08-15 13:18:43 (GMT) |
commit | a5b39908d0a3c57020e7293fd03c744aebd4c909 (patch) | |
tree | e86500f857a56f27ec861731a63b75edaa614929 | |
parent | 4fd01232ff83b490cb0feedca38221c765893f4c (diff) | |
parent | 3b7d6cf28e95c767ceb6e87c074077206c73dd80 (diff) | |
download | tk-a5b39908d0a3c57020e7293fd03c744aebd4c909.zip tk-a5b39908d0a3c57020e7293fd03c744aebd4c909.tar.gz tk-a5b39908d0a3c57020e7293fd03c744aebd4c909.tar.bz2 |
Only build the threaded builds by default.
For msvcrt static builds, allow to link against libraries where the 'x' is missing (generated by Makefile.in)
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | win/buildall.vc.bat | 69 | ||||
-rw-r--r-- | win/rules.vc | 52 |
3 files changed, 83 insertions, 44 deletions
@@ -1,3 +1,9 @@ +2012-08-15 Jan Nijtmans <nijtmans@users.sf.net> + + * win/buildall.vc.bat: Only build the threaded builds by default + * win/rules.vc: For msvcrt static builds, allow to link + against libraries where the 'x' is missing (generated by Makefile.in). + 2012-08-11 Jan Nijtmans <nijtmans@users.sf.net> * library/*.tcl: [Bug 3555644]: Better use of virtual events. diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index 58360b9..1400dbb 100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat @@ -23,18 +23,27 @@ goto OPTIONS_DONE :: reset errorlevel cd > nul +:: You might have installed your developer studio to add itself to the +:: path or have already run vcvars32.bat. Testing these envars proves +:: cl.exe and friends are in your path. +:: +if defined VCINSTALLDIR (goto :startBuilding) +if defined MSDEVDIR (goto :startBuilding) +if defined MSVCDIR (goto :startBuilding) +if defined MSSDK (goto :startBuilding) +if defined WINDOWSSDKDIR (goto :startBuilding) + :: We need to run the development environment batch script that comes -:: with developer studio (v4,5,6,7,etc...) All have it. These paths -:: might not be correct. You may need to edit these. +:: with developer studio (v4,5,6,7,etc...) All have it. This path +:: might not be correct. You should call it yourself prior to running +:: this batchfile. :: -if not defined MSDevDir ( - call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" - ::call "C:\Program Files\Microsoft Developer Studio\vc\bin\vcvars32.bat" - ::call c:\dev\devstudio60\vc98\bin\vcvars32.bat - if errorlevel 1 goto no_vcvars -) +call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" +if errorlevel 1 (goto no_vcvars) +:startBuilding +echo. echo Sit back and have a cup of coffee while this grinds through ;) echo You asked for *everything*, remember? echo. @@ -54,6 +63,7 @@ if "%TCLDIR%" == "" set TCLDIR=..\..\tcl :: Build the normal stuff along with the help file. :: +<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< set OPTS=none if not %SYMBOLS%.==. set OPTS=symbols nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1 @@ -75,26 +85,43 @@ if errorlevel 1 goto error :: Build the core and shell for thread support. :: -set OPTS=threads -if not %SYMBOLS%.==. set OPTS=symbols,threads +======= COMMON ANCESTOR content follows ============================ +set OPTS=none +if not %SYMBOLS%.==. set OPTS=symbols +nmake -nologo -f makefile.vc release winhelp OPTS=%OPTS% %1 +if errorlevel 1 goto error + +:: Build the static core, dlls and shell. +:: +set OPTS=static +if not %SYMBOLS%.==. set OPTS=symbols,static nmake -nologo -f makefile.vc release OPTS=%OPTS% %1 if errorlevel 1 goto error -:: Build a static, thread support core library (no shell). +:: Build the special static libraries that use the dynamic runtime. :: -set OPTS=static,threads -if not %SYMBOLS%.==. set OPTS=symbols,static,threads +set OPTS=static,msvcrt +if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt nmake -nologo -f makefile.vc core OPTS=%OPTS% %1 if errorlevel 1 goto error -:: Build the special static libraries the use the dynamic runtime, -:: but now with thread support. +:: Build the core and shell for thread support. +:: +======= MERGED IN content follows ================================== +>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +set OPTS=threads +if not %SYMBOLS%.==. set OPTS=symbols,threads +nmake -nologo -f makefile.vc release OPTS=%OPTS% %1 +if errorlevel 1 goto error + +:: Build the static core and shell. :: set OPTS=static,msvcrt,threads if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt,threads -nmake -nologo -f makefile.vc core OPTS=%OPTS% %1 +nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 if errorlevel 1 goto error +set OPTS= set SYMBOLS= goto end @@ -103,16 +130,16 @@ echo *** BOOM! *** goto end :no_vcvars -echo vcvars32.bat not found. You'll need to edit this batch script. +echo vcvars32.bat was not run prior to this batchfile, nor are the MS tools in your path. goto out :help title buildall.vc.bat help message echo usage: -echo %0 : builds Tk for all build types (do this first) -echo %0 install : installs all the release builds (do this second) -echo %0 symbols : builds Tk for all debugging build types. -echo %0 symbols install : install all the debug builds +echo %0 : builds Tk for all build types (do this first) +echo %0 install : installs all the release builds (do this second) +echo %0 symbols : builds Tk for all debugging build types +echo %0 symbols install : install all the debug builds echo. goto out diff --git a/win/rules.vc b/win/rules.vc index f09e2ea..adc3165 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -218,7 +218,7 @@ DEBUG = 0 SYMBOLS = 0 PROFILE = 0 PGO = 0 -MSVCRT = 0 +MSVCRT = 1 LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 USE_THREAD_ALLOC = 1 @@ -234,9 +234,13 @@ STATIC_BUILD = 0 !message *** Doing msvcrt MSVCRT = 1 !else +!if !$(STATIC_BUILD) +MSVCRT = 1 +!else MSVCRT = 0 !endif -!if [nmakehlp -f $(OPTS) "staticpkg"] +!endif +!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD) !message *** Doing staticpkg TCL_USE_STATIC_PACKAGES = 1 !else @@ -245,6 +249,7 @@ TCL_USE_STATIC_PACKAGES = 0 !if [nmakehlp -f $(OPTS) "nothreads"] !message *** Compile explicitly for non-threaded tcl TCL_THREADS = 0 +USE_THREAD_ALLOC= 0 !else TCL_THREADS = 1 USE_THREAD_ALLOC= 1 @@ -298,15 +303,6 @@ UNCHECKED = 0 !endif !endif - -!if !$(STATIC_BUILD) -# Make sure we don't build overly fat DLLs. -MSVCRT = 1 -# We shouldn't statically put the extensions inside the shell when dynamic. -TCL_USE_STATIC_PACKAGES = 0 -!endif - - #---------------------------------------------------------- # Figure-out how to name our intermediate and output directories. # We wouldn't want different builds to use the same .obj files @@ -348,10 +344,8 @@ TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX TMP_DIRFULL = $(TMP_DIRFULL:Static=) SUFX = $(SUFX:s=) EXT = dll -!if $(MSVCRT) TMP_DIRFULL = $(TMP_DIRFULL:X=) SUFX = $(SUFX:x=) -!endif !else TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=) EXT = lib @@ -583,19 +577,16 @@ Failed to find tcl.h. The TCLDIR macro does not appear correct. TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) -!if $(TCL_VERSION) < 81 -TCL_DOES_STUBS = 0 -!else -TCL_DOES_STUBS = 1 -!endif - !if $(TCLINSTALL) TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe" -!if !exist($(TCLSH)) && $(TCL_THREADS) -TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe" +!if !exist($(TCLSH)) +TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:x=).exe" !endif TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib" TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib" +!if !exist($(TCLIMPLIB)) +TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:x=).lib" +!endif TCL_LIBRARY = $(_TCLDIR)\lib TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib" TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib" @@ -604,11 +595,14 @@ TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target TCL_INCLUDES = -I"$(_TCLDIR)\include" !else TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe" -!if !exist($(TCLSH)) && $(TCL_THREADS) -TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe" +!if !exist($(TCLSH)) +TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:x=).exe" !endif TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib" TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib" +!if !exist($(TCLIMPLIB)) +TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:x=).lib" +!endif TCL_LIBRARY = $(_TCLDIR)\library TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib" TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib" @@ -681,13 +675,25 @@ TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION) !if "$(PROJECT)" != "tk" !if $(TKINSTALL) WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe" +!if !exist($(WISH)) +WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX:x=).exe" +!endif TKSTUBLIB = "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib" TKIMPLIB = "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib" +!if !exist($(TKIMPLIB)) +TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib" +!endif TK_INCLUDES = -I"$(_TKDIR)\include" !else WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe" +!if !exist($(WISH)) +WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX:x=).exe" +!endif TKSTUBLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib" TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib" +!if !exist($(TKIMPLIB)) +TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX:x=).lib" +!endif TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib" !endif !endif |