From 98840b104906f4c811868722e6a4bf6ffe102ca1 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Wed, 24 Jan 2007 06:37:21 +0000 Subject: 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 --- .../GenBuild/org/tianocore/build/GenBuildTask.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Tools/Java') 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 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 ""; + } } -- cgit v1.2.3