Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build/org.eclipse.cdt.autotools.core')
-rw-r--r--build/org.eclipse.cdt.autotools.core/ChangeLog14
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java40
2 files changed, 39 insertions, 15 deletions
diff --git a/build/org.eclipse.cdt.autotools.core/ChangeLog b/build/org.eclipse.cdt.autotools.core/ChangeLog
index 7e2dab6a3b2..11ff4a875f8 100644
--- a/build/org.eclipse.cdt.autotools.core/ChangeLog
+++ b/build/org.eclipse.cdt.autotools.core/ChangeLog
@@ -1,3 +1,17 @@
+2012-03-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bug #371277
+ * src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
+ (regenerateMakefiles): Fix setting of status on error.
+ (runScript): Switch to use sh -c for all script execution.
+
+2012-03-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bug #372557
+ * src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
+ (runScript): Fix index out of range exception when environment variable is
+ unknown.
+
2012-03-29 Jeff Johnston <jjohnstn@redhat.com>
* src/org/eclipse/cdt/autotools/core/AutotoolsNewProjectNature.java: Fix old nature id to contain the .core specifier.
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
index f7bbd236872..915011efe15 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
@@ -301,7 +301,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
}
private Status regenerateMakefiles(IConfiguration icfg, boolean reconfigure) throws CoreException {
- Status status;
+ MultiStatus status;
int rc = IStatus.OK;
String errMsg = new String();
boolean needFullConfigure = false;
@@ -614,7 +614,14 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
} finally {
// getGenerationProblems().clear();
status = new MultiStatus(AutotoolsPlugin
- .getUniqueIdentifier(), rc, errMsg, null);
+ .getUniqueIdentifier(), rc, errMsg, null);
+ if (rc != IStatus.OK)
+ status.add(new Status (
+ rc,
+ AutotoolsPlugin.getUniqueIdentifier(),
+ 0,
+ errMsg,
+ null));
}
return status;
}
@@ -1032,21 +1039,24 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
}
configTargets[0] = getPathString(commandPath);
- // Fix for bug #343731
+ // Fix for bug #343879
if (Platform.getOS().equals(Platform.OS_WIN32)
- || Platform.getOS().equals(Platform.OS_MACOSX)) {
+ || Platform.getOS().equals(Platform.OS_MACOSX))
removePWD = true;
- // Neither Mac or Windows support calling scripts directly.
- String command = null;
- for (String arg : configTargets) {
- // TODO check for spaces in args
- if (command == null)
- command = arg;
- else
- command += " " + arg;
- }
- configTargets = new String[] { "-c", command };
+
+ // Fix for bug #343731 and bug #371277
+ // Always use sh -c for executing autotool scripts which should
+ // work on all Linux POSIX compliant shells including bash, dash, as
+ // well as Windows and Mac OSX.
+ String command = null;
+ for (String arg : configTargets) {
+ // TODO check for spaces in args
+ if (command == null)
+ command = arg;
+ else
+ command += " " + arg;
}
+ configTargets = new String[] { "-c", command };
for (int i = 0; i < configTargets.length; ++i) {
// try to resolve the build macros in any argument
@@ -1060,7 +1070,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
cfg);
// strip any env-var settings from options
// fix for bug #356278
- if (resolved.charAt(0) != '-')
+ if (resolved.length() > 0 && resolved.charAt(0) != '-')
resolved = stripEnvVarsFromOption(resolved, additionalEnvs);
configTargets[i] = resolved;
} catch (BuildMacroException e) {

Back to the top