This week was hack week for all the
Open Source hackers at Novell, where we got to work on ideas and
projects that we were personally interested in. I decided to work
on something that I've been planning for a long time, ever since I
joined the Mono project, in fact:
add support for Mono in Automake.
It has been a while since I hacked on the automake source tree, but I didn't have too much trouble getting started. In the end, I got most of the features I intended for it:
- support for building Mono exes and dlls
- support for installing them in the GAC
- support out-of-tree builds
- dependency tracking on sources
- support for specifying resources, and tracking dependencies on them
- support for specifying references, and tracking dependencies on them
- support for multiple languages, include C#, VB.NET, Nemerle, Boo
- easy extensibility of the support to other languages -- essentially, just need to add the filename extension of the language to SUFFIXES
- bundled autoconf macro to detect installed compilers and other tools
- ... and some examples, test cases, and documentation to explain how to use all of it
Stuff missing include
- autoconf macros to detect if libraries are installed or not
- support for Microsoft's compilers -- basically a question of replacing '/' with '\' in filenames, where appropriate
- support for response files -- mainly wrt distributing sources mentioned in them
- real life experience with actual projects using all the above features
The whole effort took up most of the five days. I spent much of
Monday checking out the code from CVS into git
and looking at how support for C and other languages was
implemented. I had most of the basic support done by Tuesday, got
all dependency tracking working by Wednesday, and added
documentation, autoconf support, and GAC-installation support by
Friday afternoon. I'm very happy that I spent the time upfront to
import the project into git, since it saved me from spending a lot
of timeslices tracking my changes.
The code is available as a series of patches to Automake (packed conveniently in a tarball), and there's also an example project that shows how to use it. I also have a "lightning talk" short video about the project.
As much as I enjoyed the coding, I also thoroughly enjoyed working with the whole Bangalore open source team, all in the same conference room for five days, with everyone having a good time, and good food.