Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2008-01-18 16:26:31 -0500
committerKen Ryall2008-01-18 16:26:31 -0500
commit950ecfb8acdb7e9f29f0b36284b45cd88a1380bf (patch)
tree43198268c91f905c60ed3ec8fff5118f3ca74f08
parentd487deccf1fed5ede3e2c57c77a15156e01451fc (diff)
downloadorg.eclipse.cdt-950ecfb8acdb7e9f29f0b36284b45cd88a1380bf.tar.gz
org.eclipse.cdt-950ecfb8acdb7e9f29f0b36284b45cd88a1380bf.tar.xz
org.eclipse.cdt-950ecfb8acdb7e9f29f0b36284b45cd88a1380bf.zip
Bug 212474, check make file device.
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
index 2f0b6f53c6..751caf94f8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
@@ -16,6 +16,7 @@ import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.gnu.IInclude;
import org.eclipse.cdt.make.internal.core.makefile.Directive;
import org.eclipse.cdt.make.internal.core.makefile.Parent;
+import org.eclipse.core.runtime.Path;
public class Include extends Parent implements IInclude {
@@ -51,7 +52,21 @@ public class Include extends Parent implements IInclude {
continue;
} catch (IOException e) {
}
- if (!filenames[i].startsWith(GNUMakefile.FILE_SEPARATOR) && dirs != null) {
+ if (filenames[i].startsWith(GNUMakefile.FILE_SEPARATOR)) {
+ // Try to set the device to that of the parent makefile.
+ String filename = getFileName();
+ if (filename != null) {
+ String device = new Path(filename).getDevice();
+ if (device != null) {
+ try {
+ gnu.parse(new Path(filenames[i]).setDevice(device).toOSString());
+ addDirective(gnu);
+ continue;
+ } catch (IOException e) {
+ }
+ }
+ }
+ } else if (dirs != null) {
for (int j = 0; j < dirs.length; j++) {
try {
String filename = dirs[j] + GNUMakefile.FILE_SEPARATOR + filenames[i];

Back to the top