}
//print("Add source file %s\n", path);
- valac += " " + path;
+ var relpath = path;
+ if (relpath.length > context.basedir.length
+ && relpath.substring(0,context.basedir.length) == context.basedir) {
+ relpath = relpath.substring(context.basedir.length);
+ }
+ valac += " " + relpath;
- if (Regex.match_simple("\\.c$", path)) {
- context.add_c_source_file(path);
+ if (Regex.match_simple("\\.c$", relpath)) {
+ context.add_c_source_file(relpath);
continue;
}
var xsf = new Vala.SourceFile (
context,
Vala.SourceFileType.SOURCE,
- path
+ relpath
);
xsf.add_using_directive (ns_ref);
context.add_source_file(xsf);