X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcomponent.cpp;h=29bf9d10e692445bafe68c2e7095d46afa3fbadf;hb=f5d3127099bc41f986094eb98732849ee9bfb748;hp=29f58b48c7633c1396d3938f73d33a9bf6a2b70d;hpb=76be6f9f3d6ed0b39044938fa7e424284627eac5;p=builder.git diff --git a/source/component.cpp b/source/component.cpp index 29f58b4..29bf9d1 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -5,8 +5,10 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ -#include -#include +#include +#include +#include +#include #include #include "builder.h" #include "component.h" @@ -85,8 +87,7 @@ void Component::create_targets() const list inst_tgts; for(PathList::const_iterator i=files.begin(); i!=files.end(); ++i) { - string basename=(*i)[-1]; - string ext=splitext(basename).ext; + string ext=FS::extpart(FS::basename(*i)); if((ext==".cpp" || ext==".c") && build_exe) { SourceFile *src=new SourceFile(builder, this, i->str()); @@ -151,8 +152,7 @@ PathList Component::collect_source_files() const PathList files; for(PathList::const_iterator i=sources.begin(); i!=sources.end(); ++i) { - struct stat st=stat(*i); - if(S_ISDIR(st.st_mode)) + if(FS::is_dir(*i)) { list sfiles=list_files(*i); for(list::iterator j=sfiles.begin(); j!=sfiles.end(); ++j)