]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenDepexTask.java
Polished the build tools' screen output to be in a more coherent form
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / GenDepexTask.java
index 983e4d603cb66d0295827804ad425526c7a965fe..5a5e115a975e51e74666c3ce1d45842011c8ab56 100644 (file)
@@ -14,6 +14,8 @@
 \r
  **/\r
 package org.tianocore.framework.tasks;\r
+import java.io.File;\r
+\r
 import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.Project;\r
 import org.apache.tools.ant.Task;\r
@@ -35,6 +37,7 @@ public class GenDepexTask extends Task implements EfiDefine {
     /// input pre-processed dependency text files name\r
     ///\r
     private String inputFile = "";\r
+    private String inputFileName = "";\r
     ///\r
     /// padding integer value\r
     ///\r
@@ -79,24 +82,17 @@ public class GenDepexTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(commandLine.getCommandline());\r
 \r
-            System.out.println(Commandline.toString(commandLine\r
-                    .getCommandline()));\r
-\r
+            log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+            log(inputFileName);\r
             returnVal = runner.execute();\r
             if (EFI_SUCCESS == returnVal) {\r
-                //\r
-                // command execution success\r
-                //\r
-                System.out.println("GenDepex execute succeeded!");\r
-\r
+                log("GenDepex succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                System.out.println("GenDepex failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
-                throw new BuildException("GenDepex failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
+                log("ERROR = " + Integer.toHexString(returnVal));\r
+                throw new BuildException("GenDepex failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
@@ -131,6 +127,7 @@ public class GenDepexTask extends Task implements EfiDefine {
       @param inputFileName          name of inputFile\r
     **/\r
     public void setInputFile(String inputFileName) {\r
+        this.inputFileName = (new File(inputFileName)).getName();\r
         this.inputFile = " -I " + inputFileName;\r
     }\r
 \r