X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcompile.cpp;h=efa20efea3a6af31b9003a99396ac66be018f992;hb=4c11e2a041d2064f44b7eb3dbf1976c35fc8881c;hp=53802639dae7786675aff8e9ff994582bed2334b;hpb=0f5283a54fd188072eca23fbd980a43c6c869913;p=builder.git diff --git a/source/compile.cpp b/source/compile.cpp index 5380263..efa20ef 100644 --- a/source/compile.cpp +++ b/source/compile.cpp @@ -21,6 +21,8 @@ Compile::Compile(Builder &b, const ObjectFile &obj): { const Component &comp=obj.get_component(); + work_dir=comp.get_package().get_source(); + const TargetList &deps=obj.get_depends(); Path spath=deps.front()->get_name(); @@ -44,13 +46,13 @@ Compile::Compile(Builder &b, const ObjectFile &obj): Path opath=obj.get_name(); argv.push_back("-o"); - argv.push_back(opath.str()); - argv.push_back(spath.str()); + argv.push_back(relative(opath, work_dir).str()); + argv.push_back(relative(spath, work_dir).str()); if(!builder.get_dry_run()) mkpath(opath.subpath(0, opath.size()-1), 0755); - announce(comp.get_package().get_name(), tool, relative(opath, comp.get_package().get_source()).str()); + announce(comp.get_package().get_name(), tool, relative(opath, work_dir).str()); launch(); }