Distributed under the LGPL
*/
-#include <msp/core/error.h>
+#include <msp/core/except.h>
#include <msp/path/utils.h>
#include <msp/strings/lexicalcast.h>
#include "builder.h"
for(PackageList::iterator i=requires.begin(); i!=requires.end(); ++i)
build_info.add((*i)->get_exported_binfo());
+ for(StringList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
+ *i=(pkg.get_source() / *i).str();
+ for(StringList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
+ *i=(pkg.get_source() / *i).str();
+
if(type==PROGRAM)
{
string strip=pkg.get_config().get_option("strip").value;
for(PathList::const_iterator i=files.begin(); i!=files.end(); ++i)
{
string basename=(*i)[-1];
- string ext=Path::splitext(basename).ext;
+ string ext=splitext(basename).ext;
if((ext==".cpp" || ext==".c") && build_exe)
{
SourceFile *src=new SourceFile(builder, this, i->str());
PathList files;
for(PathList::const_iterator i=sources.begin(); i!=sources.end(); ++i)
{
- struct stat st;
- stat(*i, st);
+ struct stat st=stat(*i);
if(S_ISDIR(st.st_mode))
{
list<string> sfiles=list_files(*i);