const PathList &sources=j->get_sources();
for(PathList::const_iterator k=sources.begin(); k!=sources.end(); ++k)
{
- list<string> sfiles=list_files(*k);
- for(list<string>::iterator l=sfiles.begin(); l!=sfiles.end(); ++l)
- files.push_back(*k / *l);
+ struct stat st;
+ stat(*k, st);
+ if(S_ISDIR(st.st_mode))
+ {
+ list<string> sfiles=list_files(*k);
+ for(list<string>::iterator l=sfiles.begin(); l!=sfiles.end(); ++l)
+ files.push_back(*k / *l);
+ }
+ else
+ files.push_back(*k);
}
bool build_exe=j->get_type()!=Component::HEADERS;
vector<Action *> actions;
- //ProgressBar *progress=0;
if(chrome)
- {
- //progress=new ProgressBar(cout, total);
cout<<"0 targets built\n";
- }
unsigned count=0;
bool fail=false;
Target *tgt=cmdline->get_buildable_target();
if(tgt)
{
- /*if(chrome)
- {
- cout<<"\e["<<actions.size()+1<<'A';
- //progress->set(count);
- cout<<"\e["<<actions.size()+1<<'B';
- }*/
Action *action=tgt->build();
if(action)
actions.push_back(action);
}
}
- //delete progress;
-
return fail?-1:0;
}