X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fobjectfile.cpp;h=778f74642acc72ca476f2a70224db1e886f7bd2e;hb=refs%2Ftags%2F0.9;hp=3fd88d25b06f83af74eb8a051e55d4af05a2cf06;hpb=0f5283a54fd188072eca23fbd980a43c6c869913;p=builder.git diff --git a/source/objectfile.cpp b/source/objectfile.cpp index 3fd88d2..778f746 100644 --- a/source/objectfile.cpp +++ b/source/objectfile.cpp @@ -5,7 +5,8 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#include +#include +#include #include "builder.h" #include "compile.h" #include "component.h" @@ -48,10 +49,6 @@ void ObjectFile::find_depends() deps_ready=new_deps.empty(); } -Action *ObjectFile::build() -{ - return Target::build(new Compile(builder, *this)); -} /** Recursively looks for header targets and adds them as dependencies. @@ -91,8 +88,13 @@ void ObjectFile::add_depend(Target *tgt) new_deps.push_back(tgt); } +Action *ObjectFile::create_action() +{ + return new Compile(builder, *this); +} + string ObjectFile::generate_target_name(const Component &comp, const string &src) { const SourcePackage &pkg=comp.get_package(); - return (pkg.get_temp_dir()/comp.get_name()/(splitext(basename(src)).base+".o")).str(); + return (pkg.get_temp_dir()/comp.get_name()/(FS::basepart(FS::basename(src))+".o")).str(); }