X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Tools%2FSource%2FFrameworkTasks%2Forg%2Ftianocore%2Fframework%2Ftasks%2FGenSectionTask.java;h=a631d93de506bda10c736768620f947306314dbd;hb=1fa1cb752a62f624ff8e7d81c89b89b56c44dc13;hp=e432a2ce41bde24fbe4ea59e007581b84ed1a549;hpb=878ddf1fc3540a715f63594ed22b6929e881afb4;p=mirror_edk2.git diff --git a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenSectionTask.java b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenSectionTask.java index e432a2ce41..a631d93de5 100644 --- a/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenSectionTask.java +++ b/Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenSectionTask.java @@ -16,9 +16,11 @@ package org.tianocore.framework.tasks; +import java.io.File; + +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.types.Commandline; @@ -29,6 +31,10 @@ public class GenSectionTask extends Task implements EfiDefine { /// private String inputFile = ""; /// + /// + /// + private String inputFileName = ""; + /// /// outputfile name /// private String outputFile = ""; @@ -59,11 +65,11 @@ public class GenSectionTask extends Task implements EfiDefine { // // absolute path of efi tools // - String path = project.getProperty("env.Framework_Tools_Path"); + String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH"); if (path == null) { - command = "gensection"; + command = "GenSection"; } else { - command = path + "/" + "gensection"; + command = path + "/" + "GenSection"; } // // argument of tools @@ -86,22 +92,18 @@ public class GenSectionTask extends Task implements EfiDefine { runner.setAntRun(project); runner.setCommandline(cmdline.getCommandline()); - System.out.println(Commandline.toString(cmdline.getCommandline())); + log(inputFileName); + log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE); revl = runner.execute(); if (EFI_SUCCESS == revl) { - // - // command execution success - // - System.out.println("gensection successed!"); + log("GenSection succeeded!", Project.MSG_VERBOSE); } else { // // command execution fail // - System.out.println("gensection failed. (error=" - + Integer.toHexString(revl) + ")"); - throw new BuildException("gensection failed. (error=" - + Integer.toHexString(revl) + ")"); + log("ERROR = " + Integer.toHexString(revl)); + throw new BuildException("GenSection failed!"); } } catch (Exception e) { throw new BuildException(e.getMessage()); @@ -127,6 +129,7 @@ public class GenSectionTask extends Task implements EfiDefine { @param inputFile name of input file **/ public void setInputFile(String inputFile) { + this.inputFileName = (new File(inputFile)).getName(); this.inputFile = " -i " + inputFile; }