Tried to fix EDKT149. Since the issue happened randomly, only long time test can...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Aug 2006 01:53:55 +0000 (01:53 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Aug 2006 01:53:55 +0000 (01:53 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1243 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/IncludePath.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java

index 3a30488..c2865cb 100644 (file)
@@ -72,7 +72,7 @@ public class IncludePath implements NestElement {
      @param     name    The name of include path\r
      **/\r
     public void setName(String name){\r
-        this.path = "-I " + name;\r
+        this.path = " -I " + name;\r
     }\r
 \r
     /**\r
index 446bf0d..5c04977 100644 (file)
@@ -354,16 +354,12 @@ public class MakeDeps extends Task {
             //\r
             String line = null;\r
             while ((line = lineReader.readLine()) != null) {\r
-                Pattern pattern = Pattern.compile(target + "[ ]*:[ ]*(.+)");\r
-                Matcher matcher = pattern.matcher(line);\r
-\r
-                while (matcher.find()) {\r
+                String[] filePath = line.split(" : ");\r
+                if (filePath.length == 2) {\r
                     ///\r
                     /// keep the file name after ":"\r
                     ///\r
-                    String filePath = line.substring(matcher.start(1), matcher.end(1));\r
-                    filePath = cleanupPathName(filePath);\r
-                    lineSet.add(filePath);\r
+                    lineSet.add(cleanupPathName(filePath[1]));\r
                 }\r
             }\r
             lineReader.close();\r