Translate the Arch enum to an arch directory name. This is necessary for Linux builds...
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 May 2006 21:34:51 +0000 (21:34 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 May 2006 21:34:51 +0000 (21:34 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@298 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java

index 2104a51..2d3318d 100644 (file)
@@ -267,6 +267,20 @@ public class GenBuildTask extends Task {
         ant.execute();\r
     }\r
 \r
+    /**\r
+      Return the name of the directory that corresponds to the architecture.\r
+      This is a translation from the XML Schema tag to a directory that\r
+      corresponds to our directory name coding convention.\r
+     \r
+    **/\r
+    private String archDir(String arch) {\r
+        return arch.replaceFirst("X64", "x64")\r
+                   .replaceFirst("IPF", "Ipf")\r
+                   .replaceFirst("IA32", "Ia32")\r
+                   .replaceFirst("ARM", "Arm")\r
+                   .replaceFirst("EBC", "Ebc");\r
+    }\r
+\r
     /**\r
       Get the dependent library instances and include package name from \r
       surface area, and initialize module include pathes. \r
@@ -281,7 +295,7 @@ public class GenBuildTask extends Task {
                 includes.add("${WORKSPACE_DIR}" + File.separatorChar + GlobalData.getPackagePath(packageName)\r
                              + File.separatorChar + "Include");\r
                 includes.add("${WORKSPACE_DIR}" + File.separatorChar + GlobalData.getPackagePath(packageName)\r
-                             + File.separatorChar + "Include" + File.separatorChar + "${ARCH}");\r
+                             + File.separatorChar + "Include" + File.separatorChar + archDir(arch));\r
             }\r
         }\r
         includes.add("${DEST_DIR_DEBUG}");\r