TIP #203 Version 1.4: Create tclConfig.sh-Equivalent in Tcl

This is not necessarily the current version of this TIP.


TIP:203
Title:Create tclConfig.sh-Equivalent in Tcl
Version:$Revision: 1.4 $
Authors: Colin McCormack <coldstore at users dot sourceforge dot net>
Don Porter <dgp at users dot sf dot net>
Colin McCormack <colin at sharedtech dot dyndns dot org>
State:Draft
Type:Project
Tcl-Version:8.5
Vote:Pending
Created:Thursday, 17 June 2004
Discussions To:http://mini.net/tcl/tclConfig.sh
Keywords:configuration, installation

Abstract

This proposal requires the build-time creation of a file tclConfig.tcl that is equivalent to tclConfig.sh in both logical content and location.

Rationale

Packages such as Critcl[1], and indeed anything which tries to build extensions under Tcl need more introspection to discover the ground rules of construction in the installation in which they find themselves.

In order to facilitate such future build tools, the build information should be made available to Tcl scripts.

Specification

The web page http://mini.net/tcl/tclConfig.sh contains a parser to understand a tclConfig.sh and set variables in the ::tclConfig namespace.

Anything similar would suffice, whether it's added to a dict under info, tcl_platform, or placed in a namespace doesn't greatly matter.

Comments

How about converting this proposal into a proposal listing the values found in tclConfig.sh and proposing that Tcl should pass those values into Tcl_RegisterConfig during initialization? That would make all the values available to scripts via the ::tcl::pkgconfig command.

I think the Tip 59 mechanism is a good one, with the considerable advantage of providing the data directly. My only concern is one of implementation: several of the assigned values in tclConfig.sh contain references to other variables - should these be reproduced verbatim, or evaluated prior to registration? I'm leaning toward verbatim storage, let the people who use the data evaluate it as they wish.

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows