diff options
Diffstat (limited to 'Tools/Java')
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 8be1d62cc0..2265d6ba05 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -649,10 +649,11 @@ public class GenBuildTask extends Ant { // if it is CUSTOM_BUILD
// then call the exist BaseName_build.xml directly.
//
- if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
- EdkLog.log(this, "Call user-defined " + moduleId.getName() + "_build.xml");
+ String buildFilename = "";
+ 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);
return ;
@@ -664,7 +665,7 @@ public class GenBuildTask extends Ant { //
String ffsKeyword = saq.getModuleFfsKeyword();
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);
//
@@ -815,4 +816,15 @@ public class GenBuildTask extends Ant { public void setExternalProperties(Vector<Property> 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 "";
+ }
}
|