Polished the build tools' screen output to be in a more coherent form
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 12 Jul 2006 12:39:18 +0000 (12:39 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 12 Jul 2006 12:39:18 +0000 (12:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@916 6f19259b-4bc3-4df7-8a09-765794883524

28 files changed:
EdkNt32Pkg/Sec/SecMain_build.xml
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/CreateMtFileTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiCompressTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/EfiRomTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FlashMapTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FrameworkLogger.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FwImageTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenAcpiTableTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCRC32SectionTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenCapsuleHdrTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenDepexTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenFfsFileTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenFvImageTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenSectionTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GenTeImageTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/GuidChkTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/ModifyInfTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/PeiReBaseTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SecApResetVectorFixupTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SecFixupTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SetStampTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/SplitfileTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/StrGatherTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/StripTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/VfrCompilerTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/ZeroDebugDataTask.java
Tools/Source/TianoTools/GenDepex/GenDepex.c

index 6c29d22..6144f52 100644 (file)
@@ -148,6 +148,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         \r
         <sequential>\r
           <shellscript shell="cmd.exe" tmpsuffix=".cmd" >\r
+            <arg line="/q"/>\r
             <arg line="/c"/>\r
             <arg line="call"/>\r
             "${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb\r
index 07acafd..2d97d7b 100644 (file)
@@ -108,24 +108,21 @@ public class CreateMtFileTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
-            \r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());\r
             revl = runner.execute();\r
             \r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"CreateMtFile succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "CreateMtFile failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("CreateMtFile failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+                throw new BuildException("CreateMtFile failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 0ee1c10..55e7fa7 100644 (file)
@@ -104,7 +104,8 @@ public class EfiCompressTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
             \r
             revl = runner.execute();\r
             \r
@@ -112,15 +113,13 @@ public class EfiCompressTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"EfiCompress succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "EfiCompress failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("Strip failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("Strip failed!");\r
 \r
             }\r
         } catch (Exception e) {\r
index 0018e2b..763b73f 100644 (file)
@@ -161,8 +161,10 @@ public class EfiRomTask extends Task implements EfiDefine {
                 argList.add(((Input)pe32ComprList.next()).getFile());\r
             }\r
         }\r
-        EdkLog.log(EdkLog.EDK_INFO, argList.toString().replaceAll(",",""));\r
-        \r
+\r
+        EdkLog.log(EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));\r
+        EdkLog.log(EdkLog.EDK_INFO, " ");\r
+\r
         //\r
         // lauch the program\r
         //\r
@@ -177,15 +179,15 @@ public class EfiRomTask extends Task implements EfiDefine {
             exitCode = cmdProc.waitFor();\r
             if (exitCode != 0) {\r
                 int len = cmdOut.read(buf, 0, 1024);\r
-                EdkLog.log(EdkLog.EDK_ERROR,new String(buf, 0, len));\r
+                EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));\r
             } else {\r
-                EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "EfiRom succeeded!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
         } finally {\r
             if (exitCode != 0) {\r
-                //throw new BuildException("GenFvImage: failed to generate FV file!");\r
+                throw new BuildException("EfiRom failed!");\r
             }\r
         }\r
     }\r
index dc34638..436fd64 100644 (file)
@@ -29,9 +29,9 @@ import org.apache.tools.ant.BuildException;
 import org.tianocore.logger.EdkLog;\r
 \r
 /**\r
- * SecFixupTask class.\r
+ * FlashMapTask class.\r
  * \r
- * SecFixupTask is used to call SecFixup.exe to fix up sec image.\r
+ * FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.\r
  */\r
 public class FlashMapTask extends Task implements EfiDefine {\r
     // /\r
@@ -40,7 +40,7 @@ public class FlashMapTask extends Task implements EfiDefine {
     private final String toolName = "FlashMap";\r
 \r
     // /\r
-    // / Flash default file\r
+    // / Flash definition file\r
     // /\r
     private String flashDefFile = "";\r
 \r
@@ -181,7 +181,6 @@ public class FlashMapTask extends Task implements EfiDefine {
             }\r
         }\r
 \r
-        EdkLog.log(EdkLog.EDK_INFO, argList.toString().replace(",",""));\r
         //\r
         // lauch the program\r
         //\r
@@ -198,19 +197,19 @@ public class FlashMapTask extends Task implements EfiDefine {
             //\r
             // log command line string.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, cmdProc.getOutputStream().toString());\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());\r
             if (exitCode != 0) {\r
                 int len = cmdOut.read(buf, 0, 1024);\r
-                EdkLog.log(EdkLog.EDK_ERROR, new String(buf, 0, len));\r
+                EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));\r
             } else {\r
-                EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "FlashMap succeeded!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
         } finally {\r
             if (exitCode != 0) {\r
-                // throw new BuildException("GenFvImage: failed to generate FV\r
-                // file!");\r
+                throw new BuildException("FlashMap failed!");\r
             }\r
         }\r
     }\r
index 28e7d83..26d38bb 100644 (file)
@@ -25,13 +25,10 @@ class FrameworkLogger implements LogMethod {
     private String  titleName;\r
     public FrameworkLogger(Project project, String taskName) {\r
         this.project = project;\r
-        this.titleName = taskName;\r
-        \r
-        \r
+        this.titleName = taskName;        \r
     }\r
 \r
-    public void putMessage(Object msgSource, int msgLevel, String msg) {\r
-        \r
+    public void putMessage(Object msgSource, int msgLevel, String msg) {        \r
         String frameworkMsg = " [" + this.titleName + "] " + msg;\r
         this.project.log(frameworkMsg, Project.MSG_INFO);\r
     }\r
index 7188d1d..1021f1a 100644 (file)
  **/\r
 package org.tianocore.framework.tasks;\r
 \r
-import org.apache.tools.ant.Task;\r
-import org.apache.tools.ant.Project;\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
 import org.apache.tools.ant.taskdefs.Execute;\r
 import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
 import org.apache.tools.ant.types.Commandline;\r
+import org.tianocore.logger.EdkLog;\r
 \r
 \r
 /**\r
@@ -38,6 +41,7 @@ public class FwImageTask extends Task implements EfiDefine{
     /// input PE image\r
     /// \r
     private String peImage = "";\r
+    private String peImageName = "";\r
     ///\r
     /// output EFI image\r
     /// \r
@@ -93,24 +97,18 @@ public class FwImageTask extends Task implements EfiDefine{
 \r
             runner.setAntRun(project);\r
             runner.setCommandline(cmdline.getCommandline());\r
-            //System.out.println(Commandline.toString(cmdline.getCommandline()));\r
-            //GenBuildTask.myLogger.log(Commandline.toString(cmdline.getCommandline()),0);\r
-            //getProject().log(Commandline.toString(cmdline.getCommandline()));\r
+\r
+            log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+            log(this.peImageName);\r
             revl = runner.execute();\r
             if (EFI_SUCCESS == revl) {\r
-                //\r
-                // command execution success\r
-                //\r
-                System.out.println("fwimage succeeded!");\r
+                log("fwimage succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                System.out.println("fwimage failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("fwimage failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                log("ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("fwimage failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
@@ -155,6 +153,7 @@ public class FwImageTask extends Task implements EfiDefine{
       @param  peImage        name of PE image\r
     **/\r
     public void setPeImage(String peImage) {\r
+        this.peImageName = (new File(peImage)).getName();\r
         this.peImage = " " + peImage;\r
     }\r
 \r
index 156d7e3..0b17b10 100644 (file)
@@ -104,24 +104,21 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
-            \r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
             revl = runner.execute();\r
             \r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"GenAcpiTable successed!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "GenAcpiTable failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("GenAcpiTable failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("GenAcpiTable failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index d72480a..cf02466 100644 (file)
@@ -89,29 +89,23 @@ public class GenCRC32SectionTask extends Task implements EfiDefine{
             \r
             runner.setAntRun(project);\r
             runner.setCommandline(cmdline.getCommandline());\r
-            System.out.println(Commandline.toString(cmdline.getCommandline()));\r
-            \r
+            log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+            log(" ");\r
             revl = runner.execute();\r
             if (EFI_SUCCESS == revl){\r
                 //\r
                 //  command execution success \r
                 //\r
-                System.out.println("gencrc32section succeeded!");\r
-            }\r
-            else\r
-            {\r
+                log("gencrc32section succeeded!", Project.MSG_VERBOSE);\r
+            } else {\r
                 // \r
                 // command execution fail\r
                 //\r
-                System.out.println("gencrc32section failed. (error=" + \r
-                    Integer.toHexString(revl) + \r
-                    ")"\r
-                    );\r
+                log("ERROR = " + Integer.toHexString(revl));\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
-        }\r
-        \r
+        }        \r
     }\r
 \r
     /**\r
index 9071e8e..c532113 100644 (file)
@@ -137,25 +137,21 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
-                    .getCommandline()));\r
-\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(scriptFile)).getName());\r
             revl = runner.execute();\r
 \r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO, "GenCapsuleHdr succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "GenCapsuleHdr failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("GenCapsuleHdr failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("GenCapsuleHdr failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 983e4d6..5a5e115 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
index ceff320..3c7ebed 100644 (file)
@@ -169,17 +169,16 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
 \r
         }\r
 \r
-        ffsFile = new File (outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);  \r
-        System.out.print("General Ffs file: file name is:\n");\r
-        System.out.print(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);\r
-        System.out.print("\n");\r
-        \r
+        String ffsFilePath = outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix;\r
+        ffsFile = new File (ffsFilePath);  \r
         //\r
         // Create ffs ORG file. fileName = FfsFileGuid + BaseName + ffsSuffix +\r
         // ".org".\r
         //\r
-        ffsOrgFile = new File(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix + ".org");\r
+        ffsOrgFile = new File(ffsFilePath + ".org");\r
            \r
+        log(ffsFile.getName());\r
+        log(ffsOrgFile.getName());\r
         try {\r
             //\r
             //  Create file output stream -- dataBuffer.\r
@@ -428,8 +427,8 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
             //\r
             ffsBuffer.close();\r
             orgFfsBuffer.close();\r
-            System.out.print ("Successful create ffs file!\n");\r
         } catch (Exception e) {\r
+            log("genffsfile failed!");\r
             throw new BuildException (e.getMessage());\r
         }\r
     }   \r
index dbcf346..90a613f 100644 (file)
@@ -78,6 +78,7 @@ public class GenFvImageTask extends Task implements EfiDefine{
         ProcessBuilder pb = new ProcessBuilder(argList);\r
         pb.directory(new File(outputDir));\r
         int exitCode = 0;\r
+        log((new File(this.infFile)).getName());\r
         try {\r
             Process cmdProc = pb.start();\r
             InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());\r
@@ -86,9 +87,9 @@ public class GenFvImageTask extends Task implements EfiDefine{
             exitCode = cmdProc.waitFor();\r
             if (exitCode != 0) {\r
                 int len = cmdOut.read(buf, 0, 1024);\r
-                log(new String(buf, 0, len), Project.MSG_ERR);\r
+                log(new String(buf, 0, len));\r
             } else {\r
-                log("GenFvImage - DONE!", Project.MSG_VERBOSE);\r
+                log("GenFvImage succeeded!", Project.MSG_VERBOSE);\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 75b6511..25328a1 100644 (file)
 \r
 package org.tianocore.framework.tasks;\r
 \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
-import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.taskdefs.Execute;\r
 import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
 import org.apache.tools.ant.types.Commandline;\r
@@ -29,6 +31,10 @@ public class GenSectionTask extends Task implements EfiDefine {
     ///\r
     private String inputFile = "";\r
     ///\r
+    /// \r
+    /// \r
+    private String inputFileName = "";\r
+    ///\r
     /// outputfile name\r
     ///\r
     private String outputFile = "";\r
@@ -86,22 +92,18 @@ public class GenSectionTask extends Task implements EfiDefine {
 \r
             runner.setAntRun(project);\r
             runner.setCommandline(cmdline.getCommandline());\r
-            System.out.println(Commandline.toString(cmdline.getCommandline()));\r
 \r
+            log(inputFileName);\r
+            log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
             revl = runner.execute();\r
             if (EFI_SUCCESS == revl) {\r
-                //\r
-                // command execution success\r
-                //\r
-                System.out.println("gensection succeeded!");\r
+                log("gensection succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                System.out.println("gensection failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("gensection failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
+                log("ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("gensection failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
@@ -127,6 +129,7 @@ public class GenSectionTask extends Task implements EfiDefine {
       @param inputFile            name of input file\r
     **/\r
     public void setInputFile(String inputFile) {\r
+        this.inputFileName = (new File(inputFile)).getName();\r
         this.inputFile = " -i " + inputFile;\r
     }\r
 \r
index 347ae91..9717c68 100644 (file)
@@ -125,8 +125,8 @@ public class GenTeImageTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
-                    .getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
 \r
             revl = runner.execute();\r
 \r
@@ -134,16 +134,13 @@ public class GenTeImageTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO, "GenTeImage succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "GenTeImage failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("GenTeImage failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+                throw new BuildException("GenTeImage failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index ebccca4..8b69432 100644 (file)
@@ -113,7 +113,7 @@ public class GuidChkTask extends Task implements EfiDefine{
                           printGuiDef + \r
                           printAllGuid;     \r
         try {\r
-            System.out.println(command + " " + argument);\r
+            log(command + " " + argument, Project.MSG_VERBOSE);\r
             //\r
             // execute command line \r
             //\r
@@ -134,17 +134,13 @@ public class GuidChkTask extends Task implements EfiDefine{
             else {\r
                 BufferedReader bin = new BufferedReader(new InputStreamReader(proc.getInputStream()));\r
                 String line = bin.readLine();\r
-                System.out.println(line);\r
                 while (line != null ){\r
-                    System.out.print(line);\r
                     line = bin.readLine();\r
                 }               \r
             }                      \r
-            System.out.println("GuidChkTask Success!");\r
+            log("GuidChkTask Succeeded!", Project.MSG_VERBOSE);\r
         } catch (Exception e) {\r
-            System.out.println("GuidChkTask failed!");\r
-            System.out.println(e.getMessage());\r
-            \r
+            throw new BuildException("GuidChkTask failed!");\r
         }\r
     }\r
     /**\r
index c72b1f6..e927f8c 100644 (file)
@@ -35,6 +35,7 @@ import org.apache.tools.ant.taskdefs.Execute;
 import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
 import org.apache.tools.ant.types.Commandline;\r
 import org.apache.tools.ant.types.Path;\r
+import org.tianocore.logger.EdkLog;\r
 \r
 /**\r
  Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.\r
@@ -77,6 +78,10 @@ public class MakeDeps extends Task {
 \r
         Project prj  = this.getOwningTarget().getProject();\r
         String  toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");\r
+        FrameworkLogger logger = new FrameworkLogger(prj, "makedeps");\r
+        EdkLog.setLogLevel(prj.getProperty("env.LOGLEVEL"));\r
+        EdkLog.setLogger(logger);\r
+\r
         ///\r
         /// compose full tool path\r
         ///\r
@@ -118,8 +123,9 @@ public class MakeDeps extends Task {
         Iterator iterator = inputFileList.iterator();\r
         while (iterator.hasNext()) {\r
             Input inputFile = (Input)iterator.next();\r
+            String inputFileString = cleanupPathName(inputFile.getFile());\r
             args.append(" -f ");\r
-            args.append(cleanupPathName(inputFile.getFile()));\r
+            args.append(inputFileString);\r
         }\r
 \r
         ///\r
@@ -165,6 +171,9 @@ public class MakeDeps extends Task {
         runner.setAntRun(prj);\r
         runner.setCommandline(cmd.getCommandline());\r
 \r
+        EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));\r
+        EdkLog.log(EdkLog.EDK_INFO, " ");\r
+\r
         int result = 0;\r
         try {\r
             result = runner.execute();\r
@@ -173,7 +182,7 @@ public class MakeDeps extends Task {
         }\r
 \r
         if (result != 0) {\r
-            log ("MakeDeps failed");\r
+            EdkLog.log(EdkLog.EDK_INFO, "MakeDeps failed!");\r
             return;\r
         }\r
 \r
index a492cfd..82f161a 100644 (file)
@@ -119,25 +119,21 @@ public class ModifyInfTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
-                    .getCommandline()));\r
-\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFVInfFileName)).getName());\r
             revl = runner.execute();\r
 \r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO, "ModifyInfTask succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "ModifyInfTask failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("ModifyInfTask failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("ModifyInfTask failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index c033c0d..ec74651 100644 (file)
@@ -40,7 +40,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
     // / Input file\r
     // /\r
     private String inputFile = "";\r
-\r
+    private String inputFileName = "";\r
     // /\r
     // / Output file\r
     // /\r
@@ -128,7 +128,8 @@ public class PeiReBaseTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);\r
             \r
             revl = runner.execute();\r
             \r
@@ -136,16 +137,13 @@ public class PeiReBaseTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"PeiBase succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "PeiBase failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("PeiBase failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("PeiReBase failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
@@ -172,6 +170,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
      *            string of input file name.\r
      */\r
     public void setInputFile(String inputFile) {\r
+        this.inputFileName = (new File(inputFile)).getName();\r
         this.inputFile = "-I " + inputFile;\r
     }\r
 \r
index 79a7b54..e1b9bd1 100644 (file)
@@ -111,7 +111,8 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());\r
             \r
             revl = runner.execute();\r
             \r
@@ -119,16 +120,13 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"SecApResetVectorFixup succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "SecApResetVectorFixup failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("SecApResetVectorFixup failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("SecApResetVectorFixup failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 64c9295..38c6d1e 100644 (file)
@@ -116,8 +116,7 @@ public class SecFixupTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline\r
-                    .getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
 \r
             revl = runner.execute();\r
 \r
@@ -125,16 +124,13 @@ public class SecFixupTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO, "SecFixup succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "SecFixup succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "SecFixup failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("SecFixup failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));\r
+                throw new BuildException("SecFixup failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index a59598a..a06d312 100644 (file)
@@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 package org.tianocore.framework.tasks;\r
 \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
@@ -74,23 +76,18 @@ public class SetStampTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(commandLine.getCommandline());\r
 \r
-            System.out.println(Commandline.toString(commandLine\r
-                    .getCommandline()));\r
+            log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+            log((new File(this.peFile)).getName());\r
 \r
             returnVal = runner.execute();\r
             if (EFI_SUCCESS == returnVal) {\r
-                ///\r
-                /// command execution success\r
-                ///\r
-                System.out.println("SetStamp execute succeeded!");\r
+                log("SetStamp succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 ///\r
                 /// command execution fail\r
                 ///\r
-                System.out.println("SetStamp failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
-                throw new BuildException("SetStamp failed. (error="\r
-                        + Integer.toHexString(returnVal) + ")");\r
+                log("ERROR = " + Integer.toHexString(returnVal));\r
+                throw new BuildException("SetStamp failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index b3f813c..b2fad5c 100644 (file)
@@ -98,22 +98,20 @@ public class SplitfileTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(cmdline.getCommandline());\r
             \r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
             revl = runner.execute();\r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO, "splitfile succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "splitfile succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "splitfile failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("splitfile failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("splitfile failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 4aa12eb..ed8ef2d 100644 (file)
@@ -148,22 +148,18 @@ public class StrGatherTask extends Task implements EfiDefine {
 \r
             runner.setAntRun(project);\r
             runner.setCommandline(cmdline.getCommandline());\r
-            System.out.println(Commandline.toString(cmdline.getCommandline()));\r
 \r
+            log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);\r
+            log(this.commandType.substring(2));\r
             revl = runner.execute();\r
             if (EFI_SUCCESS == revl) {\r
-                ///\r
-                /// command execution success\r
-                ///\r
-                System.out.println("strgather succeeded!");\r
+                log("strgather succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
                 ///\r
                 /// command execution fail\r
                 ///\r
-                System.out.println("strgather failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("strgather failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
+                log("ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("strgather failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index 1f5f9ad..0f775a5 100644 (file)
@@ -105,7 +105,8 @@ public class StripTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
             \r
             revl = runner.execute();\r
             \r
@@ -113,16 +114,13 @@ public class StripTask extends Task implements EfiDefine {
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"Strip succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "Strip succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "Strip failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("Strip failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("Strip failed!");\r
             }\r
         } catch (Exception e) {\r
             throw new BuildException(e.getMessage());\r
index cf2fe1e..8d3a22d 100644 (file)
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 package org.tianocore.framework.tasks;\r
 \r
+import java.io.File;\r
 import java.io.IOException;\r
 import java.util.ArrayList;\r
 import java.util.List;\r
@@ -39,7 +40,8 @@ public class VfrCompilerTask extends Task implements EfiDefine {
     private String outPutDir = "";\r
     private String createIfrBinFile = "";\r
     private String processerArg ="";\r
-    private String vfrFile;\r
+    private String vfrFile = "";\r
+    private String vfrFileName = "";\r
 \r
     private List<Object> includepathList = new ArrayList<Object>();\r
 \r
@@ -116,6 +118,7 @@ public class VfrCompilerTask extends Task implements EfiDefine {
      @param     vfrFile The name of VFR file\r
      **/\r
     public void setVfrFile(String vfrFile) {\r
+        this.vfrFileName = (new File(vfrFile)).getName();\r
         this.vfrFile = " " + vfrFile;\r
     }\r
 \r
@@ -203,17 +206,15 @@ public class VfrCompilerTask extends Task implements EfiDefine {
             runner.setAntRun(project);\r
             runner.setCommandline(commandLine.getCommandline());\r
 \r
-            System.out.println(Commandline.toString(commandLine.getCommandline()));         \r
+            log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
+            log(vfrFileName);\r
             int returnVal = runner.execute();\r
             if (EFI_SUCCESS == returnVal) {\r
-                System.out.println("VfrCompiler execution succeeded!");\r
+                log("VfrCompiler succeeded!", Project.MSG_VERBOSE);\r
             } else {\r
-                System.out.println("VfrCompiler failed. (error=" + \r
-                                   Integer.toHexString(returnVal) + ")");  \r
-                throw new BuildException("VfrCompiler failed. (error=" + \r
-                                         Integer.toHexString(returnVal) + ")");\r
+                log("ERROR = " + Integer.toHexString(returnVal));\r
+                throw new BuildException("VfrCompiler failed!");\r
             }\r
-\r
         } catch (IOException e) {\r
             throw new BuildException(e.getMessage());\r
         }\r
index 5ef058a..eb9707a 100644 (file)
@@ -105,23 +105,22 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
             //\r
             // Set debug log information.\r
             //\r
-            EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));\r
-            \r
+            EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
+            EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());\r
+\r
             revl = runner.execute();\r
             \r
             if (EFI_SUCCESS == revl) {\r
                 //\r
                 // command execution success\r
                 //\r
-                EdkLog.log(EdkLog.EDK_INFO,"ZeroDebug succeeded!");\r
+                EdkLog.log(EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");\r
             } else {\r
                 //\r
                 // command execution fail\r
                 //\r
-                EdkLog.log(EdkLog.EDK_ERROR, "ZeroDebug failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
-                throw new BuildException("ZeroDebug failed. (error="\r
-                        + Integer.toHexString(revl) + ")");\r
+                EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));\r
+                throw new BuildException("ZeroDebugData failed!");\r
 \r
             }\r
         } catch (Exception e) {\r
index 34857fc..67ffcd2 100644 (file)
@@ -854,16 +854,6 @@ Returns:
   Output_Flag = FALSE;\r
   Pad_Flag    = FALSE;\r
 \r
-  //\r
-  //  Output the calling arguments\r
-  //\r
-  printf ("\n\n");\r
-  for (Index = 0; Index < argc; Index++) {\r
-    printf ("%s ", argv[Index]);\r
-  }\r
-\r
-  printf ("\n\n");\r
-\r
   if (argc < 5) {\r
     printf ("Not enough arguments\n");\r
     PrintGenDepexUsageInfo ();\r