Skip to content

Best of the worlds

Wednesday, 15 June 2005  |  thiago

So what would the best buildsystem be, according to me?

./configure
make
make install

In case you've been startled, read on.

First of all, let's differentiate the system configuration checker (a.k.a. configure) from the builder (a.k.a. make). I don't mind if it is the same tool that does both jobs, but in my mind they are separate things. But I didn't say autoconf and make/automake.

The build system has to be described by a simple file. I don't need complex rules to tell my build system that library libfoo is composed of foo.cpp, bar.cpp and baz.cpp. I would much rather see a simple NAME = VALUE based file, as much as possible. So writing a Makefile.am would be best for me.

Any complex rules required by the build system (DCOP, kconfig_compiler, kdeinit, --enable-final) would be handled by a backend: a script of some sorts that would parse my simple NAME=VALUE file.

This build system would produce simple, concise output when nothing is wrong, along with a progress indicator:

10% compiling kdecore/kapplication.cpp
11% compiling kdecore/kurl.cpp

It would also know the difference between compile jobs and non-compilation jobs. That is so that I can tell it to run two linkers at once along with 6 compilers, one linker and 7 compilers, or 8 compilers (imagine a dual-processor computer on an icecream network with other 5 computers/processors). Not only that, it would query icecream to find out how many compilation slots are available --- at aKademy, computers join and leave the network at all times.

I don't mind it not doing comparison on the pre-processed output, ignoring whitespace. We have distcc for that, and if needed be, icecream could do it too. If it did that, though, it would have to save the files somewhere outside the build tre, just like distcc: I rm -rf the build tree before starting a new build.

It should also, on “make install