From 807f03b48dcdb08f9acb0493b804a5b41d5bf7a0 Mon Sep 17 00:00:00 2001 From: mdejong Date: Wed, 16 Jul 2003 19:34:14 +0000 Subject: * win/Makefile.in: Don't define TCL_DBGX symbol for every compile. Instead, define TCL_PIPE_DLL only when compiling tclWinPipe.c. This will break other build systems, so they will need to remove the TCL_DBGX define and replace it with a define for TCL_PIPE_DLL. * win/makefile.vc: Ditto. * win/tclWinPipe.c (TclpCreateProcess): Remove PREFIX_IDENT and DEBUG_IDENT from top of file. Use TCL_PIPE_DLL passed in from build env instead of trying to construct the dll name from already defined symbols. This approach is more flexible and better in the long run. --- ChangeLog | 17 +++++++++++++++++ win/Makefile.in | 8 ++++++-- win/makefile.vc | 5 +++-- win/tclWinPipe.c | 9 ++------- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index bbd888a..800da69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2003-07-16 Mo DeJong + + * win/Makefile.in: Don't define TCL_DBGX + symbol for every compile. Instead, define + TCL_PIPE_DLL only when compiling tclWinPipe.c. + This will break other build systems, so + they will need to remove the TCL_DBGX define + and replace it with a define for TCL_PIPE_DLL. + * win/makefile.vc: Ditto. + * win/tclWinPipe.c (TclpCreateProcess): + Remove PREFIX_IDENT and DEBUG_IDENT from + top of file. Use TCL_PIPE_DLL passed in + from build env instead of trying to construct + the dll name from already defined symbols. + This approach is more flexible and better + in the long run. + 2003-07-16 Don Porter * generic/tclFileName.c (Tcl_GlobObjCmd): [Bug 771840] diff --git a/win/Makefile.in b/win/Makefile.in index 929defc..d40a6f1 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.68 2003/01/28 11:03:53 mdejong Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.68.2.1 2003/07/16 19:34:14 mdejong Exp $ VERSION = @TCL_VERSION@ @@ -85,7 +85,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX) +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ # To enable compilation debugging reverse the comment characters on # one of the following lines. @@ -383,6 +383,10 @@ ${PIPE_DLL_FILE}: ${PIPE_OBJS} tclWinInit.${OBJEXT}: tclWinInit.c $(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME) +tclWinPipe.${OBJEXT}: tclWinPipe.c + $(CC) -c $(CC_SWITCHES) -DBUILD_tcl -DTCL_PIPE_DLL=\"$(PIPE_DLL_FILE)\" \ + $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME) + testMain.${OBJEXT}: tclAppInit.c $(CC) -c $(CC_SWITCHES) -DTCL_TEST @DEPARG@ $(CC_OBJNAME) diff --git a/win/makefile.vc b/win/makefile.vc index a2d613d..029a462 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.100.2.3 2003/03/23 03:10:13 kennykb Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.100.2.4 2003/07/16 19:34:14 mdejong Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -355,7 +355,8 @@ crt = -MTd !endif TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -BASE_CLFAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) -DTCL_DBGX=$(DBGX) +BASE_CLFAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) \ + -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE TCL_CFLAGS = $(BASE_CLFAGS) $(OPTDEFINES) diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 9e5d7e0..875995e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,12 +9,9 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.33.2.1 2003/03/12 19:19:32 dgp Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.33.2.2 2003/07/16 19:34:14 mdejong Exp $ */ -#define PREFIX_IDENT "" -#define DEBUG_IDENT TCL_DBGX - #include "tclWinInt.h" #include @@ -1211,9 +1208,7 @@ TclpCreateProcess( char *start,*end; Tcl_DString pipeDll; Tcl_DStringInit(&pipeDll); - Tcl_DStringAppend(&pipeDll, PREFIX_IDENT "tclpip" - STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) - STRINGIFY(DEBUG_IDENT) ".dll ", -1); + Tcl_DStringAppend(&pipeDll, TCL_PIPE_DLL, -1); tclExePtr = Tcl_NewStringObj(TclpFindExecutable(""), -1); start = Tcl_GetStringFromObj(tclExePtr, &i); for (end = start + (i-1); end > start; end--) { -- cgit v0.12