While repairing the damage caused by removing libtool from the MK build process, I came up with what I think is a better way to deal with all the language bindings of Metakit.

Have started implementing it for Tcl / Mk4tcl. The basic idea is to first build the core library in the builds/ directory, as before, possibly followed by running the regression test suite. Once that build is done, *leave* the object files there, and go to the respective language area to finish the job by building the extension there. This will re-use the object code generated from the initial core build, and link it all into the extension.

Reasons for this unusual approach:
 - the core gets built first, and can be independently verified
 - extensions can adopt whatever the norm is for that language
 - no need to bring all the C++ config.h logic into extension builds
 - the result does not need a MK shared lib, since it includes it

I've just checked new files into the tcl/ area of MK's CVS. It uses Tcl's standard "TEA" and is derived from Tcl's sample extension. The benefits so far is that the extension config logic is truly simple, all it does is link in a bunch of extra .o files from ${srcdir}/../builds/.

Had to put "CC=g++" into the environment to make TEA work with C++. Also had to force using autoconf >= 2.5 on Gentoo (with "WANT_AUTOCONF_2_5=1", yuck). The result is a shared lib called "libMk4tcl2.4.9.3.so", and conveniences such as installing in the right place and with a suitably constructed pkgIndex.tcl file. The basic build logic should be:
cd builds
../unix/configure
make
mkdir tcl
cd tcl
../../tcl/configure --with-tcl=...
make


I hope to help do the same for Python / Mk4py and distutils.

The one issue this approach introduces, is that the core library must be built first - with the same settings as the extension (shared vs. static, debug vs. non-debug, etc). It'll take a while to get these combinations right, and to document the new approach.

The base configure scripts have not changed yet, but I think the libtool removal broke all scripting language bindings anyway. If you can't be bothered with any of this, use the 2.4.9.3 source distribution for now.

-jcw

_____________________________________________
Metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to