Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Evoy2004-05-10 11:44:32 -0400
committerSean Evoy2004-05-10 11:44:32 -0400
commit08c13e8969a6914f48a58420de73389388da0e19 (patch)
tree7fc1088741cf6af1e73a3cef78eca96ab4cb75c5 /build/org.eclipse.cdt.managedbuilder.core
parente40dd5c703980dec3b7a5f28af222f5a072cf841 (diff)
downloadorg.eclipse.cdt-08c13e8969a6914f48a58420de73389388da0e19.tar.gz
org.eclipse.cdt-08c13e8969a6914f48a58420de73389388da0e19.tar.xz
org.eclipse.cdt-08c13e8969a6914f48a58420de73389388da0e19.zip
External commit for Leo Treggiari. The archList attribute of the target object specifies the list of architectures that the target is supported on. The valid list of architectures is the string values returned by BootLoader.getOSArch(). If the archList attribute is not specified, or if the value is "all", then the target is supported on all architectures. Otherwise, the target is only displayed when CDT is running on one of the specified architectures, unless the user has requested to see all targets.
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd7
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java17
3 files changed, 32 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd b/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd
index b7612d3ceb0..bd6dfd96a96 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd
+++ b/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd
@@ -486,6 +486,13 @@ Additional special types exist to flag options of special relevance to the build
</documentation>
</annotation>
</attribute>
+ <attribute name="archList" type="string">
+ <annotation>
+ <documentation>
+ This field is used by the managed build system to decide when to show the user the target. The value should be a comma-separated list. Current values include &quot;x86&quot;, &quot;sparc&quot;, &quot;ppc&quot;; or &quot;all&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
<attribute name="errorParsers" type="string">
<annotation>
<documentation>
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java
index 7aa0ff9a9f7..c62e85fa60b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java
@@ -29,6 +29,7 @@ public interface ITarget extends IBuildObject {
public static final String MAKE_COMMAND = "makeCommand"; //$NON-NLS-1$
public static final String MAKE_ARGS = "makeArguments"; //$NON-NLS-1$
public static final String OS_LIST = "osList"; //$NON-NLS-1$
+ public static final String ARCH_LIST = "archList"; //$NON-NLS-1$
public static final String PARENT = "parent"; //$NON-NLS-1$
/**
@@ -160,6 +161,13 @@ public interface ITarget extends IBuildObject {
* @return String[]
*/
public String[] getTargetOSList();
+
+ /**
+ * Answers an array of architectures the target can be created on.
+ *
+ * @return String[]
+ */
+ public String[] getTargetArchList();
/**
* Returns the list of platform specific tools associated with this
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
index 31a330431c6..f538c1d4cba 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
@@ -51,6 +51,7 @@ public class Target extends BuildObject implements ITarget {
private IResource owner;
private ITarget parent;
private List targetOSList;
+ private List targetArchList;
private Map toolMap;
private List toolList;
private List toolReferences;
@@ -467,6 +468,22 @@ public class Target extends BuildObject implements ITarget {
}
/* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.ITarget#getTargetArchList()
+ */
+ public String[] getTargetArchList() {
+ if (targetArchList == null) {
+ // Ask parent for its list
+ if (parent != null) {
+ return parent.getTargetArchList();
+ } else {
+ // I have no parent and no defined list
+ return new String[] {"all"}; //$NON-NLS-1$
+ }
+ }
+ return (String[]) targetArchList.toArray(new String[targetArchList.size()]);
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.ITarget#getOwner()
*/
public IResource getOwner() {

Back to the top