mirror of https://github.com/acidanthera/audk.git
Sync TOOLS_DEF's attribute definitions. Since there are two copy attribute definitions in ToolDefinitions.java and ToolChainAttribute.java, remove one and only keep one definitions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1755 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
51f9486371
commit
b0a8056223
|
@ -81,6 +81,8 @@ public class ToolDefinitions {
|
||||||
public final static String TOOLS_DEF_ATTRIBUTE_EXT = "EXT";
|
public final static String TOOLS_DEF_ATTRIBUTE_EXT = "EXT";
|
||||||
public final static String TOOLS_DEF_ATTRIBUTE_FAMILY = "FAMILY";
|
public final static String TOOLS_DEF_ATTRIBUTE_FAMILY = "FAMILY";
|
||||||
public final static String TOOLS_DEF_ATTRIBUTE_FLAGS = "FLAGS";
|
public final static String TOOLS_DEF_ATTRIBUTE_FLAGS = "FLAGS";
|
||||||
|
public final static String TOOLS_DEF_ATTRIBUTE_LIBPATH = "LIBPATH";
|
||||||
|
public final static String TOOLS_DEF_ATTRIBUTE_INCLUDEPATH= "INCLUDEPATH";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Tool Chain Families in the Tools Definition file
|
/// Tool Chain Families in the Tools Definition file
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.xmlbeans.XmlException;
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
|
|
||||||
import org.tianocore.common.definitions.EdkDefinitions;
|
import org.tianocore.common.definitions.EdkDefinitions;
|
||||||
|
import org.tianocore.common.definitions.ToolDefinitions;
|
||||||
import org.tianocore.common.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
import org.tianocore.common.logger.EdkLog;
|
import org.tianocore.common.logger.EdkLog;
|
||||||
import org.tianocore.build.FrameworkBuildTask;
|
import org.tianocore.build.FrameworkBuildTask;
|
||||||
|
@ -46,7 +47,6 @@ import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
||||||
import org.tianocore.build.toolchain.ToolChainAttribute;
|
|
||||||
import org.tianocore.build.toolchain.ToolChainElement;
|
import org.tianocore.build.toolchain.ToolChainElement;
|
||||||
import org.tianocore.build.toolchain.ToolChainMap;
|
import org.tianocore.build.toolchain.ToolChainMap;
|
||||||
import org.w3c.dom.NamedNodeMap;
|
import org.w3c.dom.NamedNodeMap;
|
||||||
|
@ -545,7 +545,7 @@ public class FpdParserTask extends Task {
|
||||||
if (flagString == null) {
|
if (flagString == null) {
|
||||||
flagString = "";
|
flagString = "";
|
||||||
}
|
}
|
||||||
options[i][flagIndex] = ToolChainAttribute.FLAGS + "";
|
options[i][flagIndex] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS;
|
||||||
map.put(options[i], flagString.trim());
|
map.put(options[i], flagString.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import java.util.regex.Pattern;
|
||||||
import org.apache.xmlbeans.XmlException;
|
import org.apache.xmlbeans.XmlException;
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
|
|
||||||
|
import org.tianocore.common.definitions.ToolDefinitions;
|
||||||
import org.tianocore.common.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
import org.tianocore.common.logger.EdkLog;
|
import org.tianocore.common.logger.EdkLog;
|
||||||
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
||||||
|
@ -41,7 +42,6 @@ import org.tianocore.build.id.FpdModuleIdentification;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.build.toolchain.ToolChainAttribute;
|
|
||||||
import org.tianocore.build.toolchain.ToolChainConfig;
|
import org.tianocore.build.toolchain.ToolChainConfig;
|
||||||
import org.tianocore.build.toolchain.ToolChainElement;
|
import org.tianocore.build.toolchain.ToolChainElement;
|
||||||
import org.tianocore.build.toolchain.ToolChainInfo;
|
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||||
|
@ -720,7 +720,7 @@ public class GlobalData {
|
||||||
String[] commands = getToolChainInfo().getCommands();
|
String[] commands = getToolChainInfo().getCommands();
|
||||||
|
|
||||||
for (int i = 0; i < commands.length; ++i) {
|
for (int i = 0; i < commands.length; ++i) {
|
||||||
String cmdName = toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()});
|
String cmdName = toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME});
|
||||||
if (cmdName != null && cmdName.length() != 0) {
|
if (cmdName != null && cmdName.length() != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,7 @@ public class GlobalData {
|
||||||
if (setting == null) {
|
if (setting == null) {
|
||||||
setting = "";
|
setting = "";
|
||||||
}
|
}
|
||||||
if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolChainAttribute.FLAGS.toString())) {
|
if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS)) {
|
||||||
return setting;
|
return setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -752,10 +752,10 @@ public class GlobalData {
|
||||||
ToolChainMap option = null;
|
ToolChainMap option = null;
|
||||||
ToolChainKey toolChainFamilyKey = new ToolChainKey(commandDescription);
|
ToolChainKey toolChainFamilyKey = new ToolChainKey(commandDescription);
|
||||||
|
|
||||||
toolChainFamilyKey.setKey(ToolChainAttribute.FAMILY.toString(), ToolChainElement.ATTRIBUTE.value);
|
toolChainFamilyKey.setKey(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FAMILY, ToolChainElement.ATTRIBUTE.value);
|
||||||
String family = toolChainConfig.get(toolChainFamilyKey);
|
String family = toolChainConfig.get(toolChainFamilyKey);
|
||||||
toolChainFamilyKey.setKey(family, ToolChainElement.TOOLCHAIN.value);
|
toolChainFamilyKey.setKey(family, ToolChainElement.TOOLCHAIN.value);
|
||||||
toolChainFamilyKey.setKey(ToolChainAttribute.FLAGS.toString(), ToolChainElement.ATTRIBUTE.value);
|
toolChainFamilyKey.setKey(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS, ToolChainElement.ATTRIBUTE.value);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Platform's tool chain family option
|
// Platform's tool chain family option
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
/** @file
|
|
||||||
ToolChainAttribute class
|
|
||||||
|
|
||||||
This file is to define enumeration value for tool chain attribute names.
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
**/
|
|
||||||
|
|
||||||
package org.tianocore.build.toolchain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
ToolChainAttribute is used to define the enumeration value for the attributes
|
|
||||||
used in tool chain definition file.
|
|
||||||
|
|
||||||
**/
|
|
||||||
public class ToolChainAttribute {
|
|
||||||
private static int nextValue = 0;
|
|
||||||
|
|
||||||
///
|
|
||||||
/// "NAME", "PATH", "DPATH", "SPATH", "EXT", "FAMILY", "FLAGS"
|
|
||||||
///
|
|
||||||
public final static ToolChainAttribute NAME = new ToolChainAttribute("NAME");
|
|
||||||
public final static ToolChainAttribute PATH = new ToolChainAttribute("PATH");
|
|
||||||
public final static ToolChainAttribute DPATH = new ToolChainAttribute("DPATH");
|
|
||||||
public final static ToolChainAttribute SPATH = new ToolChainAttribute("SPATH");
|
|
||||||
public final static ToolChainAttribute EXT = new ToolChainAttribute("EXT");
|
|
||||||
public final static ToolChainAttribute FAMILY = new ToolChainAttribute("FAMILY");
|
|
||||||
public final static ToolChainAttribute FLAGS = new ToolChainAttribute("FLAGS");
|
|
||||||
|
|
||||||
private final String name;
|
|
||||||
public final int value = nextValue++;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Default constructor
|
|
||||||
*/
|
|
||||||
private ToolChainAttribute(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue