1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 08:46:02 +02:00

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>
This commit is contained in:
Jeff Johnston 2013-04-24 17:39:46 -04:00
parent 356f66ed01
commit c9e8e1e90c

View file

@ -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) {
}
}