TEA(ish)

TEA(ish): a TEA-like Build System for Tcl Extensions
Login

TEA(ish): a TEA-like Build System for Tcl Extensions

This is the home of TEA(ish), a Tcl extension-builder tool in a vein of the TEA (Tcl Extension Architecture), also known as tclconfig. The primary difference from TEA is that teaish uses Steve Bennett's Autosetup instead of the GNU Autotools, and was it was born in the effort of porting SQLite's TEA build to Autosetup.

Teaish's only scope is the build process of an extension. It in no way affects the source code of an extension. Any given extension can be hosted by both TEA and Teaish.

The goal here is not to outright replace TEA but to provide an alternative implementation which (1) is based on Autosetup and (2) has close to feature-parity with that build, taking this opportunity to drop some of the historical cruft from that build. e.g. there is currently no intent to support Tcl versions older than 8.5, nor are there specific plans to support exotic target platforms.

Collaborators are welcome! If interested, please get in touch. A willingness to use the Fossil SCM is a must (this is not hosted on github). Some moderate level of Tcl-fu is required, but nothing advanced. Familiarity with Autosetup is a plus.

Current Status

Let's call it beta. It can (./configure && make test install) the SQLite TEA extension (a copy of which is included in teaish's canonical source repository) but has yet to be tested with any other real-world Tcl extensions.

Summary of features:

Platform Portability

Autosetup runs on most POSIX-style systems. It does not work from a conventional Windows console.

Teaish has been seen to work on:

It is regularly tested with both GNU Make and BSD Make.

Download

If you're reading this on the canonical site, you can download a recent build from here, then:

$ tar xzf teaish-TIMESTAMP-HASH.tar.gz

(The HASH part of the name corresponds to its check-in version.)

With that you can build Tcl extensions with this framework and build them using one of the following approaches:

From the directory containing the teaish-format extension:

$ /path/to/teaish/configure ...
$ make test

If you do not have tcl installed at the system level, or want to use a custom build, you may want to use the --with-tcl=/installation/prefix flag. Teaish requires a Tcl installation which has a tclConfig.sh.

From some arbitrary directory:

$ /path/to/teaish/configure --teaish-extension-dir=/path/to/extension
$ make test

Or copy the extension's files to the teaish dir and simply:

$ ./configure ...
$ make test

Cloning this Repository

This repository uses the Fossil SCM. The full tree contains lots of stuff which the downloadable distribution does not, though, for "historical reasons."

It can be cloned and used like:

$ fossil clone https://fossil.wanderinghorse.net/r/teaish
$ cd teaish/teaish/example/hello
$ ../../configure --with-tcl=/install/prefix/for/your/tcl
#            e.g. --with-tcl=$HOME/tcl/v9
#            If you have a system-level tcl, it can use that.
$ make test
$ make distclean

To demonstrate an out-of-tree build, starting from where the previous example leaves of:

$ mkdir ../x
$ cd ../x
$ ../../configure \
    --with-tcl=/install/prefix/for/your/tcl \
    --teaish-extension-dir=../hello
$ make

Authoring, Building, and Testing Extensions

See doc/extensions.md.

Source Tree Structure

The directories are as follows:

Notable TODOs

In no particular order...

License

2025 April 5

The author disclaims copyright to this source code. In place of a legal notice, here is a blessing:


  1. ^ Admittedly somewhat to my surprise.