Changed the way of determining how to call customized build file. Now we check if there's XXX_build.xml existing in the source file list to determine the customized build other than the USER_DEFINED module type.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2291 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36
2007-01-24 06:37:21 +00:00
parent 2b955487b6
commit 98840b1049

View File

@ -649,10 +649,11 @@ public class GenBuildTask extends Ant {
// if it is CUSTOM_BUILD // if it is CUSTOM_BUILD
// then call the exist BaseName_build.xml directly. // then call the exist BaseName_build.xml directly.
// //
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) { String buildFilename = "";
EdkLog.log(this, "Call user-defined " + moduleId.getName() + "_build.xml"); if ((buildFilename = GetCustomizedBuildFile(fpdModuleId.getArch())) != "") {
EdkLog.log(this, "Call user-defined " + buildFilename);
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml"; String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + buildFilename;
antCall(antFilename, null); antCall(antFilename, null);
return ; return ;
@ -664,7 +665,7 @@ public class GenBuildTask extends Ant {
// //
String ffsKeyword = saq.getModuleFfsKeyword(); String ffsKeyword = saq.getModuleFfsKeyword();
ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId, includes, saq); ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId, includes, saq);
String buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml"; buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml";
fileGenerator.genBuildFile(buildFilename); fileGenerator.genBuildFile(buildFilename);
// //
@ -815,4 +816,15 @@ public class GenBuildTask extends Ant {
public void setExternalProperties(Vector<Property> v) { public void setExternalProperties(Vector<Property> v) {
this.properties = v; this.properties = v;
} }
private String GetCustomizedBuildFile(String arch) {
String[][] files = saq.getSourceFiles(arch);
for (int i = 0; i < files.length; ++i) {
if (files[i][1].endsWith("build.xml")) {
return files[i][1];
}
}
return "";
}
} }