Compiling Android / CyanogenMod from source

On the HTC Desire S, I’ve been using an unofficial build (made by Flinny) of CyanogenMod 10 for a while – happily so.
Unfortunately the author is/was a bit strapped for time, and development slowed down significantly at the time. Updates for CM 10.1 and later were not forthcoming.
Since I’m enough of a geek, and suffering from ORD, I decided to try to ‘roll my own’: to compile CM from source. As it turned out, it’s not quite as hard as you’d think it is.

First, you need toI was going to write a lengthy tutorial here, but there are plenty of tutorials out there. So instead of inventing the wheel yet again, you can just go look at this one, or here or . Or you can just go and Google it ;)

You can find the thread for my unofficial builds on XDA Developers.
The git repository with all my sources can be found here, on GitHub.