\r
import org.apache.tools.ant.BuildException;\r
import org.apache.tools.ant.BuildListener;\r
+import org.apache.tools.ant.Location;\r
import org.apache.tools.ant.Project;\r
import org.apache.tools.ant.taskdefs.Ant;\r
import org.apache.tools.ant.taskdefs.Property;\r
import org.apache.xmlbeans.XmlObject;\r
-\r
-import org.tianocore.common.definitions.ToolDefinitions;\r
-import org.tianocore.common.exception.EdkException;\r
-import org.tianocore.common.logger.EdkLog;\r
import org.tianocore.build.autogen.AutoGen;\r
import org.tianocore.build.exception.AutoGenException;\r
import org.tianocore.build.exception.GenBuildException;\r
import org.tianocore.build.id.PackageIdentification;\r
import org.tianocore.build.id.PlatformIdentification;\r
import org.tianocore.build.tools.ModuleItem;\r
+import org.tianocore.common.definitions.ToolDefinitions;\r
+import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
<p>\r
BuildException buildException = new BuildException(e.getMessage());\r
buildException.setStackTrace(e.getStackTrace());\r
throw buildException;\r
+ } catch (Exception e) {\r
+ BuildException buildException = new BuildException(e.getMessage());\r
+ buildException.setStackTrace(e.getStackTrace());\r
+ throw buildException;\r
}\r
}\r
\r
moduleId.setMsaFile(msaFile);\r
}\r
\r
- String[] producedLibraryClasses = saq.getLibraryClasses("ALWAYS_PRODUCED",null);\r
+ String[] producedLibraryClasses = saq.getLibraryClasses("ALWAYS_PRODUCED", null, null);\r
if (producedLibraryClasses.length == 0) {\r
moduleId.setLibrary(false);\r
} else {\r
}\r
\r
Set<String> archSet = new LinkedHashSet<String>();\r
-\r
- if ( getProject().getProperty("ARCH") != null) {\r
- String[] fpdArchList = getProject().getProperty("ARCH").split(" ");\r
+ String archString = getProject().getProperty("ARCH");\r
+ if (archString != null) {\r
+ String[] fpdArchList = archString.split(" ");\r
\r
for (int i = 0; i < fpdArchList.length; i++) {\r
if (archListSupByToolChain.contains(fpdArchList[i])) {\r
}\r
}\r
\r
+ if (archList.length == 0) {\r
+ EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + "[" + archString + "] is not supported for " + moduleId + " in this build!\n");\r
+ }\r
+\r
for (int k = 0; k < archList.length; k++) {\r
\r
getProject().setProperty("ARCH", archList[k]);\r
getProject().setProperty("FILE_GUID", moduleId.getGuid());\r
getProject().setProperty("VERSION", moduleId.getVersion());\r
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());\r
- getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));\r
- getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));\r
+ File msaFile = moduleId.getMsaFile();\r
+ String msaFileName = msaFile.getName();\r
+ getProject().setProperty("MODULE_DIR", msaFile.getParent().replaceAll("(\\\\)", "/"));\r
+ getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/") \r
+ + File.separatorChar + msaFileName.substring(0, msaFileName.lastIndexOf('.')));\r
\r
//\r
// SUBSYSTEM\r