Attachment "tk-changes.diff" to
ticket [456761ff]
added by
lloydlim
2001-08-30 13:03:12.
--- makefile.vc.old Mon Jul 9 12:46:10 2001
+++ makefile.vc Wed Aug 29 22:24:07 2001
@@ -71,8 +71,11 @@
# Uncomment the following line to compile with thread support
#THREADDEFINES = -DTCL_THREADS=1
-# Set NODEBUG to 0 to compile with symbols
-NODEBUG = 1
+# Set DEBUG to 1 to compile with symbols
+DEBUG = 0
+
+# Set STATIC_BUILD to 1 to build a static library
+STATIC_BUILD = 0
# uncomment the following two lines to compile with TCL_MEM_DEBUG
#DEBUGDEFINES =-DTCL_MEM_DEBUG
@@ -92,31 +95,39 @@
BINROOT = .
-!IF "$(NODEBUG)" == "1"
-TMPDIRNAME = Release
-DBGX =
-!ELSE
-TMPDIRNAME = Debug
-DBGX = d
-!ENDIF
+
+!if $(DEBUG)
+TMPDIRNAME = Debug
+DBGX = d
+!else
+TMPDIRNAME = Release
+DBGX =
+!endif
+
+!if $(STATIC_BUILD)
+STCX = s
+!else
+STCX =
+!endif
+
TMPDIR = $(BINROOT)\$(TMPDIRNAME)
OUTDIRNAME = $(TMPDIRNAME)
OUTDIR = $(TMPDIR)
-TCLLIB = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib
+TCLLIB = $(TCLNAMEPREFIX)$(VERSION)$(STCX)$(DBGX).lib
TCLPLUGINLIB = $(TCLNAMEPREFIX)$(VERSION)p.lib
-TCLSTUBLIB = $(TCLSTUBPREFIX)$(VERSION)$(DBGX).lib
+TCLSTUBLIB = $(TCLSTUBPREFIX)$(VERSION)$(STCX)$(DBGX).lib
TKDLLNAME = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
TKDLL = $(OUTDIR)\$(TKDLLNAME)
-TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
-TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib
+TKLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(STCX)$(DBGX).lib
+TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(STCX)$(DBGX).lib
TKSTUBLIB = $(OUTDIR)\$(TKSTUBLIBNAME)
TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
TKPLUGINDLL = $(OUTDIR)\$(TKPLUGINDLLNAME)
TKPLUGINLIB = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib
-WISH = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
-WISHC = $(OUTDIR)\$(WISHNAMEPREFIX)c$(VERSION)$(DBGX).exe
+WISH = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(STCX)$(DBGX).exe
+WISHC = $(OUTDIR)\$(WISHNAMEPREFIX)c$(VERSION)$(STCX)$(DBGX).exe
WISHP = $(OUTDIR)\$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
TKTEST = $(OUTDIR)\$(TKNAMEPREFIX)test.exe
CAT32 = $(TMPDIR)\cat32.exe
@@ -261,7 +272,7 @@
# Compile flags
######################################################################
-!IF "$(NODEBUG)" == "1"
+!IF !$(DEBUG)
!IF "$(MACHINE)" == "ALPHA"
# MSVC on Alpha doesn't understand -Ot
cdebug = -O2i -Gs -GD
@@ -276,23 +287,28 @@
!ENDIF
# declarations common to all compiler options
+!IF $(STATIC_BUILD)
+cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX -DSTATIC_BUILD=1
+cvars = -MT$(DBGX)
+!ELSE
cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX
-cvarsdll = -MD$(DBGX)
+cvars = -MD$(DBGX)
+!ENDIF
CON_CFLAGS = $(cdebug) $(cflags) $(include32) -DCONSOLE
-TK_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
+TK_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) \
$(TK_INCLUDES) $(TK_DEFINES) -DUSE_TCL_STUBS
-WISH_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
+WISH_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) \
$(TK_INCLUDES) $(TK_DEFINES)
######################################################################
# Link flags
######################################################################
-!IF "$(NODEBUG)" == "1"
-ldebug = /RELEASE
-!ELSE
+!IF $(DEBUG)
ldebug = -debug:full -debugtype:cv
+!ELSE
+ldebug = /RELEASE
!ENDIF
# declarations common to all linker options
@@ -309,10 +325,10 @@
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
!IF "$(MACHINE)" == "PPC"
-libc = libc$(DBGX).lib
+libc = libcmt$(DBGX).lib
libcdll = crtdll$(DBGX).lib
!ELSE
-libc = libc$(DBGX).lib oldnames.lib
+libc = libcmt$(DBGX).lib oldnames.lib
libcdll = msvcrt$(DBGX).lib oldnames.lib
!ENDIF
@@ -323,6 +339,14 @@
conlibs = $(libc) $(baselibs)
guilibsdll = $(libcdll) $(winlibs)
+!if $(STATIC_BUILD)
+WISHLIBS = $(guilibs)
+TKTESTLIBS = $(guilibs)
+!else
+WISHLIBS = $(guilibsdll)
+TKTESTLIBS = $(guilibsdll)
+!endif
+
######################################################################
# Project specific targets
######################################################################
@@ -344,7 +368,7 @@
console-wish : all $(WISHC)
stubs:
- $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(DBGX) \
+ $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(STCX)$(DBGX) \
$(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
$(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
@@ -376,10 +400,15 @@
xcopy "$(ROOT)\library\demos" "$(SCRIPT_INSTALL_DIR)\demos"
xcopy "$(ROOT)\library\demos\images" "$(SCRIPT_INSTALL_DIR)\demos\images"
+!if $(STATIC_BUILD)
+$(TKLIB): $(TKOBJS) $(TMPDIR)\tk.res $(TKSTUBLIB)
+ $(lib32) -nologo -out:$@ $(TKOBJS) $(TMPDIR)\tk.res
+!else
$(TKLIB): $(TKDLL) $(TKSTUBLIB)
+!endif
$(TKSTUBLIB): $(TKSTUBOBJS)
- $(lib32) /out:$@ $(TKSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(TKSTUBOBJS)
$(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res
$(link32) $(ldebug) $(dlllflags) \
@@ -399,11 +428,11 @@
$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
$(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
- $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(WISHOBJS)
+ $(WISHLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(WISHOBJS)
$(WISHC): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
$(link32) $(ldebug) $(conlflags) $(TMPDIR)\wish.res -out:$@ \
- $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(WISHOBJS)
+ $(WISHLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(WISHOBJS)
$(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res
$(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
@@ -412,7 +441,7 @@
$(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res
$(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
- $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
+ $(TKTESTLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
$(CAT32): $(TCLDIR)\win\cat.c
$(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $?
@@ -467,21 +496,15 @@
{$(RCDIR)}.rc{$(TMPDIR)}.res:
$(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)\include" \
-i "$(TCLDIR)\generic" \
-!if "$(NODEBUG)" == "0"
+!if $(DEBUG)
-d DEBUG \
!endif
+!if $(STATIC_BUILD)
+ -d STATIC_BUILD \
+!endif
$<
clean:
- -@del $(OUTDIR)\*.exp
- -@del $(OUTDIR)\*.lib
- -@del $(OUTDIR)\*.dll
- -@del $(OUTDIR)\*.exe
- -@del $(OUTDIR)\*.pdb
- -@del $(TMPDIR)\*.pch
- -@del $(TMPDIR)\*.obj
- -@del $(TMPDIR)\*.res
- -@del $(TMPDIR)\*.exe
-@rmd $(OUTDIR)
-@rmd $(TMPDIR)
--- mkd.bat.old Mon Jul 9 12:46:10 2001
+++ mkd.bat Wed Aug 29 22:08:14 2001
@@ -1,21 +1,11 @@
@echo off
rem RCS: @(#) $Id: mkd.bat,v 1.1.1.1 2001/07/09 19:46:10 lim Exp $
-if exist %1\tag.txt goto end
+if exist %1\nul goto end
-if "%OS%" == "Windows_NT" goto winnt
-
-md %1
-if errorlevel 1 goto end
-
-goto success
-
-:winnt
md %1
if errorlevel 1 goto end
-:success
-echo TAG >%1\tag.txt
echo created directory %1
:end
--- rmd.bat.old Mon Jul 9 12:46:10 2001
+++ rmd.bat Wed Aug 29 22:08:14 2001
@@ -1,17 +1,13 @@
@echo off
rem RCS: @(#) $Id: rmd.bat,v 1.1.1.1 2001/07/09 19:46:10 lim Exp $
-if not exist %1\tag.txt goto end
+if not exist %1\nul goto end
echo Removing directory %1
if "%OS%" == "Windows_NT" goto winnt
-cd %1
-if errorlevel 1 goto end
-del *.*
-cd ..
-rmdir %1
+deltree /y %1
if errorlevel 1 goto end
goto success