mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Fix to conform to the new Path behavior
This commit is contained in:
parent
7f7dee4d99
commit
18e5e42cd9
2 changed files with 6 additions and 3 deletions
|
@ -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
|
// 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
|
// 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".
|
// 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);
|
outs.add(modName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
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
|
* This class walks the delta supplied by the build system to determine
|
||||||
|
@ -3373,7 +3374,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
||||||
String fileName = sourceLocation.removeFileExtension().lastSegment();
|
String fileName = sourceLocation.removeFileExtension().lastSegment();
|
||||||
// Replace the % with the file name
|
// Replace the % with the file name
|
||||||
String outName = outPath.toOSString().replaceAll("%", fileName); //$NON-NLS-1$
|
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)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue