From c43c67195a60f1e002553cd8b2cf876903e3f801 Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Fri, 26 May 2006 21:34:51 +0000 Subject: [PATCH] Translate the Arch enum to an arch directory name. This is necessary for Linux builds, since it is case sensitive. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@298 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/build/GenBuildTask.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 2104a51e62..2d3318d551 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -267,6 +267,20 @@ public class GenBuildTask extends Task { ant.execute(); } + /** + Return the name of the directory that corresponds to the architecture. + This is a translation from the XML Schema tag to a directory that + corresponds to our directory name coding convention. + + **/ + private String archDir(String arch) { + return arch.replaceFirst("X64", "x64") + .replaceFirst("IPF", "Ipf") + .replaceFirst("IA32", "Ia32") + .replaceFirst("ARM", "Arm") + .replaceFirst("EBC", "Ebc"); + } + /** Get the dependent library instances and include package name from surface area, and initialize module include pathes. @@ -281,7 +295,7 @@ public class GenBuildTask extends Task { includes.add("${WORKSPACE_DIR}" + File.separatorChar + GlobalData.getPackagePath(packageName) + File.separatorChar + "Include"); includes.add("${WORKSPACE_DIR}" + File.separatorChar + GlobalData.getPackagePath(packageName) - + File.separatorChar + "Include" + File.separatorChar + "${ARCH}"); + + File.separatorChar + "Include" + File.separatorChar + archDir(arch)); } } includes.add("${DEST_DIR_DEBUG}");