decisions on building infrastructure

nilsson@cs.yale.edu nilsson@cs.yale.edu
Wed, 04 Jun 2003 15:23:31 -0400


Ross Patterson wrote:

> I'm not too worried about 3rd party library authors being forced to change
> their build systems; nobody has one that works with all 3 compilers
> (except maybe Yale).  And the information required by the common build
> system should be minimal.

Yes, we _almost_ have one, based on gnumake.

But the complexity of making it work with Haskell systems as different as Hugs
and GHC, on platforms as different as Unix/Linux and Windows,
while providing flexible support for all kinds of pre-processors, submodules
written in languages other than Haskell, and so on, became, in the end,
quite daunting, to say the least. So we're currently out of steam.
The last stumbling block, I believe, was something utterly silly like
spaces in path names (quite common under Windows), that caused some
carefully crafted snippets of shell code to fall over. Sigh.

> Sorry to be prosaic, but I would prefer to start at the bottom level,
> because there's a pressing need for a build system, and ideas there can be
> tested with code.

That's probably a good way to go. At least that has been our approach.
(Our intention was (we've got parts of it working) to add functionality for
distribution and packaging simply by adding extra make targets.)

> I think an important requirement is that most of the
> build system should be shared, either distributed separately or bundled
> with the compilers, or a bit of each, but definitely not duplicated in
> each library.  The library author should supply the absolute minimum
> information that is specific to the library, preferably in a declarative
> form.

In our case, we didn't want to require the end user to fetch a build system
separately. So, as always seem to be the case with make files, we intended
our build system to be distributed with our libraries (and applications,
it supports both). But the library (or application) writer only has
to supply some more or less declarative specifications in a few key
places: most of the build system can be copied verbatim.

Somewhat crude (as make based systems tend to be), but it almost works
for us. And with a little extra effort, I'm fairly confident we can make
it work as intended also on Windows.

Best regards,

/Henrik

-- 
Henrik Nilsson
Yale University
Department of Computer Science
nilsson@cs.yale.edu