]> git.tdb.fi Git - builder.git/blobdiff - source/objectfile.cpp
One more exception fix
[builder.git] / source / objectfile.cpp
index 5022bdd0a636774e7ac648c727ea06e2c3b28d34..c0a233f56d8f51fe3d916ec4c70776330314d7ed 100644 (file)
@@ -11,8 +11,8 @@ Distributed under the LGPL
 #include "component.h"
 #include "install.h"
 #include "objectfile.h"
-#include "package.h"
 #include "sourcefile.h"
+#include "sourcepackage.h"
 
 using namespace std;
 using namespace Msp;
@@ -94,5 +94,5 @@ void ObjectFile::add_depend(Target *tgt)
 
 string ObjectFile::generate_target_name(const Component &comp, const string &src)
 {
-       return (comp.get_package().get_temp_dir()/comp.get_name()/(Path::splitext(src.substr(src.rfind('/')+1)).base+".o")).str();
+       return (comp.get_package().get_temp_dir()/comp.get_name()/(splitext(basename(src)).base+".o")).str();
 }