Android Build System
Basics of the Android Build system are described at: http://source.android.com/porting/build_system.html
Note that "partner-setup" should be replaced with "choosecombo" or even "lunch" in that description.
More information about the Android build system, and some of the rationale for it, are described at: http://android.git.kernel.org/?p=platform/build.git;a=blob_plain;f=core/build-system.html
You use build/envsetup.sh to set up a "convenience environment" for working on the Android source code. This file should be source'ed into your current shell environment. After doing so you can type 'help' for a list of defined functions which are helpful for interacting with the source.