Fix a bug on GenBuild and have a minor update on BuildMacro.xml