Greets,

There is now a "ruby" directory within svn trunk, and it contains a Rakefile
which builds, runs, and tests Charmonizer.  Along the way, the analogous file
for Lucy's Perl bindings, trunk/perl/buildlib/Lucy/Build.pm, has been slimmed
down some more, continuing the work that Joe Schaefer started.

I think that the interface beween Charmonizer on the one hand and the Rakefile
and Lucy::Build on the other is now about as minimal as we can make it given
Charmonizer's current structure.  There are four main points of contact:

    * Build the "charmonize" executable.  ("make all")
    * Run "charmonize" to produce charmony.h.
    * Build Charmonizer's tests, which require charmony.h.  ("make tests")
    * Clean up. ("make clean")

All told, there are maybe 70 lines of build script code which have to be
ported for each host language.  It would be nice if it were smaller than that,
but Charmonizer's not a library like Snowball that we're just compiling and
linking in; it's an application that we build, run, capture output from, and
then discard.

    * Charmonizer itself is very simple C89 code.  It will compile just about
      anywhere without fuss, and it doesn't need special flags, optimization
      or tuning.  Basically we're using C89 instead of Bourne Shell a la
      Metaconfig/Autoconf.
    * The "charmonize" executable has to be run with two command line
      arguments: "charmonize CC CCFLAGS".  (There's no reason that it cannot
      be run multiple times with different compilers and ccflags, producing
      different "charmony.h" files each time.)
    * Charmonizer's *tests*, on the other hand, *must* be compiled using the
      same CC and CCFLAGS that were used to create "charmony.h".  

I also feel like it should be possible to run charmonizer's tests from within
the Perl bindings with less effort -- but a couple of refactoring attempts
today came up lacking.

The next step for the Ruby bindings will be to build the Clownfish compiler.

Marvin Humphrey

Reply via email to