X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fexecutable.cpp;h=ea2f4e0204684cb94ea25799fcd57e50a8029040;hb=0f5283a54fd188072eca23fbd980a43c6c869913;hp=0cae259f8b7b755bf74da0913a516ecafbd7d09a;hpb=1968c546cfb30214e8dc5afc722bec14aa8373f5;p=builder.git diff --git a/source/executable.cpp b/source/executable.cpp index 0cae259..ea2f4e0 100644 --- a/source/executable.cpp +++ b/source/executable.cpp @@ -44,12 +44,11 @@ void Executable::find_depends() queue.erase(queue.begin()); const StringList &libpath=c->get_build_info().libpath; - const string &arch=c->get_package().get_arch(); const list &libs=c->get_build_info().libs; for(StringList::const_iterator i=libs.begin(); i!=libs.end(); ++i) { - Target *lib=builder.get_library(*i, arch, libpath, libmode); + Target *lib=builder.get_library(*i, libpath, libmode); if(lib) { dep_libs.push_back(lib); @@ -60,7 +59,7 @@ void Executable::find_depends() queue.push_back(&stlib->get_component()); } else - builder.problem(comp.get_package().get_name(), format("Couldn't find library %s for %s", *i, Path::basename(name))); + builder.problem(comp.get_package().get_name(), format("Couldn't find library %s for %s", *i, basename(name))); } } @@ -89,8 +88,9 @@ we need to pass the value to the Target c'tor. */ string Executable::generate_target_name(const Component &c) { + const SourcePackage &pkg=c.get_package(); string prefix, suffix; - const string &arch=c.get_package().get_arch(); + const string &arch=pkg.get_builder().get_current_arch().get_name(); if(c.get_type()==Component::LIBRARY) { @@ -108,5 +108,5 @@ string Executable::generate_target_name(const Component &c) suffix=".exe"; } - return (c.get_package().get_out_dir()/(prefix+c.get_name()+suffix)).str(); + return (pkg.get_out_dir()/(prefix+c.get_name()+suffix)).str(); }