Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2013-04-24 17:39:46 -0400
committerJeff Johnston2013-04-24 17:54:03 -0400
commitc9e8e1e90c21d20634b96f054e30a595ac3a4817 (patch)
tree71cba5b5c0ae308704800ef17580d431c8646da8 /build/org.eclipse.cdt.autotools.core/src
parent356f66ed01bbb546faccb84a54ced3977ae8cef7 (diff)
downloadorg.eclipse.cdt-c9e8e1e90c21d20634b96f054e30a595ac3a4817.tar.gz
org.eclipse.cdt-c9e8e1e90c21d20634b96f054e30a595ac3a4817.tar.xz
org.eclipse.cdt-c9e8e1e90c21d20634b96f054e30a595ac3a4817.zip
Fix Autotools for options with round brackets.
- Extending fix for Bug 403946 to include options as well Change-Id: I5260f2b10ef38ea0f52b976c20cd8c8f92f1a5d1 Reviewed-on: https://git.eclipse.org/r/12171 Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> IP-Clean: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Diffstat (limited to 'build/org.eclipse.cdt.autotools.core/src')
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java15
1 files changed, 9 insertions, 6 deletions
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 19ce6a231c..ae7c4b1626 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
@@ -1014,8 +1014,6 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
// Get the path string. We add a Win check to handle MingW.
// For MingW, we would rather represent C:\a\b as /C/a/b which
// doesn't cause Makefile to choke. For Cygwin we use /cygdrive/C/a/b
- // Add backslashes to escape any special characters in the command path
- // that will give the shell distress (e.g. runtime-New_Configuration(1)).
private String getPathString(IPath path) {
String s = path.toString();
if (Platform.getOS().equals(Platform.OS_WIN32)) {
@@ -1025,12 +1023,17 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
s = s.replaceAll("^([A-Z])(:)", "/$1");
}
}
- s = s.replaceAll("\\\\", "\\\\\\\\");
- s = s.replaceAll("\\(", "\\\\(");
- s = s.replaceAll("\\)", "\\\\)");
return s;
}
+ // Fix any escape characters in sh -c command arguments
+ private String fixEscapeChars(String s) {
+ s = s.replaceAll("\\\\", "\\\\\\\\");
+ s = s.replaceAll("\\(", "\\\\(");
+ s = s.replaceAll("\\)", "\\\\)");
+ return s;
+ }
+
// Run an autotools script (e.g. configure, autogen.sh, config.status).
private int runScript(IPath commandPath, IPath runPath, String[] args,
String jobDescription, String errMsg, IConsole console,
@@ -1088,7 +1091,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
// fix for bug #356278
if (resolved.length() > 0 && resolved.charAt(0) != '-')
resolved = stripEnvVarsFromOption(resolved, additionalEnvs);
- configTargets[i] = resolved;
+ configTargets[i] = fixEscapeChars(resolved);
} catch (BuildMacroException e) {
}
}

Back to the top