Index: src/net/sf/antcontrib/cpptasks/DependencyTable.java =================================================================== --- src/net/sf/antcontrib/cpptasks/DependencyTable.java (revision 15) +++ src/net/sf/antcontrib/cpptasks/DependencyTable.java (revision 16) @@ -521,8 +521,26 @@ task.log("Parsing " + includes[i], Project.MSG_VERBOSE); // If the include is part of a UNC don't go building a // relative file name. - File src = includes[i].startsWith("\\\\") ? new File( - includes[i]) : new File(baseDir, includes[i]); + final String includeFileName = includes[i]; + File src = null; + if (includeFileName.startsWith("\\\\")) { + src = new File(includeFileName); + } else if ( + (includeFileName.charAt(1) == ':') + && + ( + includeFileName.charAt(0) + != + baseDirPath.charAt(0) + ) + ) { + // Base directory and include file live in + // different root path, thus there is not common + // part of its path. + src = new File(includeFileName); + } else { + src = new File(baseDir, includeFileName); + } DependencyInfo includeInfo = parseIncludes(task, compiler, src); includeInfos[i] = includeInfo;