diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-26 06:28:27 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-26 06:28:27 +0000 |
commit | d59f2c721ba3d73fa8a871f2c34504ae7e42cb1b (patch) | |
tree | f5139240a87e6afc64be5d597a1ef5a5e5b4e141 /Tools/Python/buildgen/BuildFile.py | |
parent | 149127db682552971634ad1017c522808367acc3 (diff) | |
download | edk2-platforms-d59f2c721ba3d73fa8a871f2c34504ae7e42cb1b.tar.xz |
- Remove the TOOL without NAME defined and its definition in ARCH_build.opt
- Prefix the tool path to its name in ARCH_build.opt
- Support the same library class in different package
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2325 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Python/buildgen/BuildFile.py')
-rw-r--r-- | Tools/Python/buildgen/BuildFile.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Tools/Python/buildgen/BuildFile.py b/Tools/Python/buildgen/BuildFile.py index 8514e4c8a4..9a2aae30b2 100644 --- a/Tools/Python/buildgen/BuildFile.py +++ b/Tools/Python/buildgen/BuildFile.py @@ -230,18 +230,19 @@ class AntPlatformBuildFile(BuildFile): """Generate ${ARCH}_build.opt which contains the default build&tool definitions"""
tools = self.Workspace.ToolConfig.ToolCodes
for arch in self.Workspace.ActiveArchs:
+ validTools = []
+ for tool in tools:
+ key = (self.Toolchain, self.Target, arch, tool, "NAME")
+ if self.Workspace.ToolConfig[key] == "": continue
+ validTools.append(tool)
+
optFileDir = os.path.join(self.Workspace.Path, self.Platform.OutputPath,
self.Target + "_" + self.Toolchain)
optFileName = arch + "_build.opt"
if not os.path.exists(optFileDir): os.makedirs(optFileDir)
f = open(os.path.join(optFileDir, optFileName), "w")
- for tool in tools:
- key = (self.Toolchain, self.Target, arch, tool, "FLAGS")
- flag = self.Workspace.ToolConfig[key]
- f.write("DEFAULT_%s_FLAGS=%s\n" % (tool, flag))
-
- f.write("\n")
- for tool in tools:
+
+ for tool in validTools:
key = (self.Toolchain, self.Target, arch, tool, "FLAGS")
if key in self.Platform.BuildOptions:
flag = self.Platform.BuildOptions[key]
@@ -254,15 +255,22 @@ class AntPlatformBuildFile(BuildFile): else:
flag = ""
f.write("PLATFORM_%s_FLAGS=%s\n" % (tool, flag))
+ f.write("\n")
+
+ for tool in validTools:
+ key = (self.Toolchain, self.Target, arch, tool, "FLAGS")
+ flag = self.Workspace.ToolConfig[key]
+ f.write("DEFAULT_%s_FLAGS=%s\n" % (tool, flag))
f.write("\n")
- for tool in tools:
+ for tool in validTools:
for attr in self.Workspace.ToolConfig.Attributes:
if attr == "FLAGS": continue
key = (self.Toolchain, self.Target, arch, tool, attr)
value = self.Workspace.ToolConfig[key]
if attr == "NAME":
- f.write("%s=%s\n" % (tool, value))
+ path = self.Workspace.ToolConfig[(self.Toolchain, self.Target, arch, tool, "PATH")]
+ f.write("%s=%s\n" % (tool, os.path.join(path, value)))
else:
f.write("%s_%s=%s\n" % (tool, attr, value))
f.write("%s_FLAGS=${DEFAULT_%s_FLAGS} ${DEFAULT_MODULE_%s_FLAGS} ${PLATFORM_%s_FLAGS} ${MODULE_%s_FLAGS}\n" %
|