diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 06:37:21 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 06:37:21 +0000 |
commit | 98840b104906f4c811868722e6a4bf6ffe102ca1 (patch) | |
tree | 4109bf50c17da5944a061ac5db7a040915350f04 /Tools/Java | |
parent | 2b955487b6cc942de2aaf162c82917be17e2699e (diff) | |
download | edk2-platforms-98840b104906f4c811868722e6a4bf6ffe102ca1.tar.xz |
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
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 "";
+ }
}
|