X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FGenBuild%2Forg%2Ftianocore%2Fbuild%2FGenBuildTask.java;h=9a847172f8f0ecfd17f3bc48248db1e34e209dca;hp=99767ab4f2278c156867ca00905797c630369bba;hb=c639781ef01dcfa4a66ac00cc0eb79bb34ef911b;hpb=feccee87a78e68d575dbdf44b34ca0cb5a21ea8d diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 99767ab4f2..9a847172f8 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -134,30 +134,25 @@ public class GenBuildTask extends Ant { try { processGenBuild(); } catch (PcdAutogenException e) { - // - // Add more logic process here - // - throw new BuildException(e.getMessage()); + BuildException buildException = new BuildException(e.getMessage()); + buildException.setStackTrace(e.getStackTrace()); + throw buildException; } catch (AutoGenException e) { - // - // Add more logic process here - // - throw new BuildException(e.getMessage()); + BuildException buildException = new BuildException(e.getMessage()); + buildException.setStackTrace(e.getStackTrace()); + throw buildException; } catch (PlatformPcdPreprocessBuildException e) { - // - // Add more logic process here - // - throw new BuildException(e.getMessage()); + BuildException buildException = new BuildException(e.getMessage()); + buildException.setStackTrace(e.getStackTrace()); + throw buildException; } catch (GenBuildException e) { - // - // Add more logic process here - // - throw new BuildException(e.getMessage()); + BuildException buildException = new BuildException(e.getMessage()); + buildException.setStackTrace(e.getStackTrace()); + throw buildException; } catch (EdkException e) { - // - // Add more logic process here - // - throw new BuildException(e.getMessage()); + BuildException buildException = new BuildException(e.getMessage()); + buildException.setStackTrace(e.getStackTrace()); + throw buildException; } } @@ -295,7 +290,7 @@ public class GenBuildTask extends Ant { // don't do anything if no tools found // if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) { - EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n"); + EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n"); continue; } @@ -480,6 +475,11 @@ public class GenBuildTask extends Ant { String cmdPath = GlobalData.getCommandSetting(key, fpdModuleId); key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME; String cmdName = GlobalData.getCommandSetting(key, fpdModuleId); + if (cmdName.length() == 0) { + EdkLog.log(this, EdkLog.EDK_VERBOSE, "Warning: " + cmd[m] + " hasn't been defined!"); + getProject().setProperty(cmd[m], ""); + continue; + } File cmdFile = new File(cmdPath + File.separatorChar + cmdName); getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/")); @@ -543,6 +543,28 @@ public class GenBuildTask extends Ant { } else { getProject().setProperty(cmd[m] + "_DPATH", ""); } + + // + // Set CC_LIBPATH + // + key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_LIBPATH; + String libpath = GlobalData.getCommandSetting(key, fpdModuleId); + if (libpath != null) { + getProject().setProperty(cmd[m] + "_LIBPATH", libpath.replaceAll("(\\\\)", "/")); + } else { + getProject().setProperty(cmd[m] + "_LIBPATH", ""); + } + + // + // Set CC_INCLUDEPATH + // + key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_INCLUDEPATH; + String includepath = GlobalData.getCommandSetting(key, fpdModuleId); + if (dpath != null) { + getProject().setProperty(cmd[m] + "_INCLUDEPATH", includepath.replaceAll("(\\\\)", "/")); + } else { + getProject().setProperty(cmd[m] + "_INCLUDEPATH", ""); + } } }