MAJOUR build script overhaul.. grown into quite a beast now

Change-Id: I866c11d7cf150c46afe43595122aaa59e5e5ecd8