Build-script : Make the script standalone as it's not needed to keep a link with CM tree. Also externalize some settings.