Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDoug Schaefer2017-10-31 19:24:00 +0000
committerDoug Schaefer2017-11-01 14:42:18 +0000
commit89cb1076e43310e5174f019eef2de87a23711247 (patch)
treeef30753b264d49c0208f5f460f850181922187ff /core
parent3935339cf7036378bf7f4c6646fbf9968b99ed5d (diff)
downloadorg.eclipse.cdt-89cb1076e43310e5174f019eef2de87a23711247.tar.gz
org.eclipse.cdt-89cb1076e43310e5174f019eef2de87a23711247.tar.xz
org.eclipse.cdt-89cb1076e43310e5174f019eef2de87a23711247.zip
Improve when build like autotools is trying to execute a script.
The new Autotools core build executes autoreconf which is a perl script. We've been assuming up until now they were always Windows exes or bats. If there's no proper extension, try finding sh and passing the command to it. Change-Id: I71ba66d7658db0bdc45608abc356b5efe80669af
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
index 2c2e14cd68c..fe55abecc93 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
@@ -417,11 +417,6 @@ public abstract class CBuildConfiguration extends PlatformObject
}
protected Path findCommand(String command) {
- if (Platform.getOS().equals(Platform.OS_WIN32)
- && !(command.endsWith(".exe") || command.endsWith(".bat"))) { //$NON-NLS-1$ //$NON-NLS-2$
- command += ".exe"; //$NON-NLS-1$
- }
-
Path cmdPath = Paths.get(command);
if (cmdPath.isAbsolute()) {
return cmdPath;
@@ -442,6 +437,14 @@ public abstract class CBuildConfiguration extends PlatformObject
Path commandPath = Paths.get(dir, command);
if (Files.exists(commandPath)) {
return commandPath;
+ } else {
+ if (Platform.getOS().equals(Platform.OS_WIN32)
+ && !(command.endsWith(".exe") || command.endsWith(".bat"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ commandPath = Paths.get(dir, command + ".exe"); //$NON-NLS-1$
+ if (Files.exists(commandPath)) {
+ return commandPath;
+ }
+ }
}
}
return null;

Back to the top