Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/ChangeLog18
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java11
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java78
4 files changed, 73 insertions, 36 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/ChangeLog b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog
index edef64bed10..ee1f767ea90 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/ChangeLog
+++ b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog
@@ -1,5 +1,21 @@
+2004-03-05 Sean Evoy
+ Fix for bug 53856: "Option reference not reporting built-in includes
+ paths to scanner"
+
+ Changed the constructor for the OptionReference so it only creates a
+ list if it finds built-in path or symbol definitions in the manifest
+ or project file. The getter method for built-ins also concatenates the
+ definitions it contains with those of its parent.
+
+ Undid the changes to the geenrated makefile builder since bug 53253 has
+ been corrected.
+
+ Fix for bug 53861: "Cannot reset tool command back to default"
+ Changed the way the configuration sets the tool command when the value
+ is the same as the default.
+
2004-03-02 Sean Evoy
- A change in VCErrorParser to fix PR 53253 causes an IndexOutOfBounds
+ A change in VCErrorParser to fix bug 53253 causes an IndexOutOfBounds
exception when echoing a build command on Win32 if the absolute path
to the make utility is specified, i.e. C:\<path>\make.exe
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
index 85edd58e327..90c5b7e3d89 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
@@ -461,7 +461,7 @@ public class Configuration extends BuildObject implements IConfiguration {
*/
public void setToolCommand(ITool tool, String command) {
// Make sure the command is different
- if (command != null && !tool.getToolCommand().equals(command)) {
+ if (command != null) {
// Does this config have a ref to the tool
ToolReference ref = getToolReference(tool);
if (ref == null) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
index 1e84f6b4e43..ac10a67949c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
@@ -348,7 +348,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
// Get a launcher for the make command
String errMsg = null;
CommandLauncher launcher = new CommandLauncher();
- launcher.showCommand(false);
+ launcher.showCommand(true);
// Set the environmennt, some scripts may need the CWD var to be set.
Properties props = launcher.getEnvironment();
@@ -372,15 +372,6 @@ public class GeneratedMakefileBuilder extends ACBuilder {
OutputStream stderr = epm.getOutputStream();
// Launch make
- StringBuffer cmd = new StringBuffer();
- cmd.append(makeCommand.toOSString());
- for (int index = 0; index < makeTargets.length; ++index) {
- cmd.append(' ');
- cmd.append(makeTargets[index]);
- }
- cmd.append(System.getProperty("line.separator", "\n")); //$NON-NLS-2$
- consoleOutStream.write(cmd.toString().getBytes());
- consoleOutStream.flush();
Process proc = launcher.execute(makeCommand, makeTargets, env, workingDirectory);
if (proc != null) {
try {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
index 3ba486871fe..72dff910f13 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
@@ -43,21 +43,6 @@ public class OptionReference implements IOption {
private Object value;
/**
- * Constructor called when the option reference is created from an
- * existing <code>IOption</code>
- *
- * @param owner
- * @param option
- */
- public OptionReference(ToolReference owner, IOption option) {
- this.owner = owner;
- this.option = option;
-
- // Until the option reference is changed, all values will be extracted from original option
- owner.addOptionReference(this);
- }
-
- /**
* This constructor will be called when the receiver is created from
* the settings found in an extension point.
*
@@ -95,13 +80,12 @@ public class OptionReference implements IOption {
case LIBRARIES:
case OBJECTS:
List valueList = new ArrayList();
- builtIns = new ArrayList();
IConfigurationElement[] valueElements = element.getChildren(LIST_VALUE);
for (int i = 0; i < valueElements.length; ++i) {
IConfigurationElement valueElement = valueElements[i];
Boolean isBuiltIn = new Boolean(valueElement.getAttribute(LIST_ITEM_BUILTIN));
if (isBuiltIn.booleanValue()) {
- builtIns.add(valueElement.getAttribute(LIST_ITEM_VALUE));
+ getBuiltInList().add(valueElement.getAttribute(LIST_ITEM_VALUE));
}
else {
valueList.add(valueElement.getAttribute(LIST_ITEM_VALUE));
@@ -112,6 +96,21 @@ public class OptionReference implements IOption {
}
/**
+ * Constructor called when the option reference is created from an
+ * existing <code>IOption</code>
+ *
+ * @param owner
+ * @param option
+ */
+ public OptionReference(ToolReference owner, IOption option) {
+ this.owner = owner;
+ this.option = option;
+
+ // Until the option reference is changed, all values will be extracted from original option
+ owner.addOptionReference(this);
+ }
+
+ /**
* Created from project file.
*
* @param owner
@@ -144,14 +143,13 @@ public class OptionReference implements IOption {
case LIBRARIES:
case OBJECTS:
List valueList = new ArrayList();
- builtIns = new ArrayList();
NodeList nodes = element.getElementsByTagName(LIST_VALUE);
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Boolean isBuiltIn = new Boolean(((Element)node).getAttribute(LIST_ITEM_BUILTIN));
if (isBuiltIn.booleanValue()) {
- builtIns.add(((Element)node).getAttribute(LIST_ITEM_VALUE));
+ getBuiltInList().add(((Element)node).getAttribute(LIST_ITEM_VALUE));
} else {
valueList.add(((Element)node).getAttribute(LIST_ITEM_VALUE));
}
@@ -309,15 +307,32 @@ public class OptionReference implements IOption {
}
}
+ private List getBuiltInList() {
+ if (builtIns == null) {
+ builtIns = new ArrayList();
+ }
+ return builtIns;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.core.build.managed.IOption#getBuiltIns()
*/
public String[] getBuiltIns() {
- // Return any overridden built-ins here, or the default set
- // from the option this is a reference to
- return builtIns == null ?
- option.getBuiltIns():
- (String[])builtIns.toArray(new String[builtIns.size()]);
+ List answer = new ArrayList();
+ if (builtIns != null) {
+ answer.addAll(builtIns);
+ }
+
+ // Add the built-ins from the referenced option to the list
+ if (option != null) {
+ String[] optionBuiltIns = option.getBuiltIns();
+ for (int index = 0; index < optionBuiltIns.length; ++index) {
+ if (!answer.contains(optionBuiltIns[index])) {
+ answer.add(optionBuiltIns[index]);
+ }
+ }
+ }
+ return (String[]) answer.toArray(new String[answer.size()]);
}
public IOption getOption() {
@@ -467,4 +482,19 @@ public class OptionReference implements IOption {
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ String answer = new String();
+ if (option != null) {
+ answer += "Reference to " + option.getName(); //$NON-NLS-1$
+ }
+
+ if (answer.length() > 0) {
+ return answer;
+ } else {
+ return super.toString();
+ }
+ }
}

Back to the top