Lots of us either choose to or simply can’t help ourselves from tweaking the living daylights out of the ROMs we flash on our devices, either to add specific functionality or simply to satisfy that basic human urge to tinker with things. Building a ROM from source undoubtedly gives you the greatest freedom to make the build your own, and many people do just that. Most people tend to use a Linux-based OS for obvious reasons. However, it is of course possible to build ROMs such as CM and AOKP on other operating systems such as the BSD-based Mac OS X.
It can be a somewhat cumbersome process to set up the build environment. You need to create a DMG, install the required tools, set up the required folder structure, and then initialize the appropriate repositories. Of course, this is all perfectly doable manually, and I’m sure some of you may well prefer to do it that way. But if you’d rather not, you should probably check out the work of XDA Senior Member frostincredible.
Frostincredible has kindly written a handy script that automates the entire process of setting up a build environment for either CM10.1 or AOKP, depending on your preference. There are still a few things you’ll need to do outside of running the script, but the overall process is greatly simplified. Currently, this will only work for officially supported devices. Unsupported devices will require you to edit the script to sync the appropriate repo.
If you’d like to try this out or just find out a little more, check out the original forum thread._________