diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java index 6132894cf86..48a98d70f71 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java @@ -249,7 +249,8 @@ public class DefaultFortranDependencyCalculator implements IManagedDependencyGen // directory path relative to the top-level build directory. The relative path comes from the source // file location. In order to specify that this output file is always in the top-level build // directory, regardless of the source file directory structure, return "./path". - IPath modName = Path.fromOSString("." + Path.SEPARATOR + modules[i] + "." + MODULE_EXTENSION); + IPath modName = new Path("./").append(Path.fromOSString(modules[i] + "." + MODULE_EXTENSION)); + outs.add(modName); } } diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java index 88d7a930d35..3cdc3ce79c2 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java @@ -99,7 +99,8 @@ import org.eclipse.core.runtime.SubProgressMonitor; */ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { - + private static final IPath DOT_SLASH_PATH = new Path("./"); //$NON-NLS-1$ + /** * This class walks the delta supplied by the build system to determine * what resources have been changed. The logic is very simple. If a @@ -3373,7 +3374,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { String fileName = sourceLocation.removeFileExtension().lastSegment(); // Replace the % with the file name String outName = outPath.toOSString().replaceAll("%", fileName); //$NON-NLS-1$ - return Path.fromOSString(outName); + IPath result = Path.fromOSString(outName); + return DOT_SLASH_PATH.isPrefixOf(outPath) ? DOT_SLASH_PATH.append(result) : result; } /* (non-Javadoc)