TIP 578: Death to TCL_DBGX

Login
Author:         Jan Nijtmans <[email protected]>
State:          Final
Type:           Project
Vote:           Done
Created:        10-June-2020
Post-History:   
Keywords:       Tcl index
Tcl-Version:    8.7
Tcl-Branch:     death-to-dbgx
Vote-Summary:   Accepted 6/0/0
Votes-For:      AK, DKF, FV, JN, KW, SL
Votes-Against:  none
Votes-Present:  none

Abstract

The TCL_DBGX variable should be removed and never spoken of again.

Rationale

Copied verbatim from TIP #34 (which was never actually completed, apparently):

The most thoroughly evil part of the entire Tcl build process is the TCL_DBGX variable used in configure.in, Makefile.in, and tclConfig.sh. The following quote from Brent Welch say it all:

"The TCL_DBGX manifestation is one of the worst /bin/sh quoting hell situations I have encountered."

Presumably, the TCL_DBGX variable was introduced to support building of debug vs. non-debug versions of Tcl and installing them into the same directory. That may have been a noble goal, but in practice this indirection makes many parts of the build system extremely difficult to modify. This scheme also fails to deal with other identifying suffixes like 's' for a static build or 't' for a threaded build. A number of queries as to the usefulness of TCL_DBGX have appeared on news:comp.lang.tcl but none produced satisfactory results. The TCL_DBGX variable should be removed and never spoken of again.

Specification

Compatibility

Extensions using it will still work for Tcl 8.x, since TCL_DBGX is still defined in tclConfig.sh as empty string. It just cannot be used to detect a debug Tcl build any more.

It also means that Windows debug builds using makefile.vc against Tcl 8.7 and higher no longer have 'd' or 'g' in their dll names any more.

Implementation

See the death-to-dbgx branch.

Copyright

This document has been placed in the public domain.