SConsification

Some days ago, Mario pointed me to SCons, a software build system like (*cough*) make and friends. Well, not exactly like it. I gave it a try and hacked up a SConstruct file for building Jamaica and came up with something that builds all the native code in only a couple of hours. While the original makefiles, configures and such are more than 10000 lines long, this scons file is only around 100 lines. Well, that comparison isn’t exactly fair, because the original build system does a lot more, like building the Java files, building a couple of different versions of the VM, building for different targets, etc. But believe, it is still a lot more concise than all this make and shell hackery. The fact that SCons is written in Python and the SConstruct file is also only a Python script, makes it very powerful (you can use all the Python API!) and easy to extend. And yes, SCons integrates builders for Java, a bunch of other languages, support for autoconf-like configuration and a lot more. If you like make, the autotools and friends like me (that is, not at all), then you should definitely check this out.

In my one of my last posts, I was rambling about that I would probably go freelancer. I am still thinking about this and can’t really decide yet. Thinking of the downside, I fear to be a 2nd class developer when doing contractor work. And then, I have a family that depends on my (stable) income. So hmm, maybe I should postpone this move to later. Hmm, difficult. After all, I can always try to do some freelance work besides my job, when I find some time (which I don’t at the moment, but that will certainly change).

Advertisements

2 Responses to SConsification

  1. Mario Torre says:

    Glad you liked SCons 🙂

    I think it’s very powerful, especially if you are just starting a project, it’s easy to build different versions, executables and libraries and such and have everything up and running in few minutes, with all the sources organized in different directories (and in different languages!) without the need to touch more than one (and usually small) build file. Maybe not the tool for everything, but so far every need I had, was easily handled by SCons.

  2. The KDE project tried to use SCons for KDE4 and eventually decided to use cmake instead because SCons was rather incomplete. You should look into it too. With KDE using cmake you know it’ll be maintained and high-quality, at least for the life of KDE4.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: