X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=7ba6be89a55fd03ccc5d570f4a325ff2c0b29300;hb=683301f94f4a3c5b7e2a7f21087f4185b07c4858;hp=2c137ca406841a1159269851f8177261504c91c9;hpb=b1a6e6dcdd7e0da272ab0ebbed4e295f83f1165a;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 2c137ca..7ba6be8 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -312,9 +312,16 @@ int Builder::create_targets() const PathList &sources=j->get_sources(); for(PathList::const_iterator k=sources.begin(); k!=sources.end(); ++k) { - list sfiles=list_files(*k); - for(list::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 sfiles=list_files(*k); + for(list::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; @@ -444,12 +451,8 @@ int Builder::build() vector actions; - //ProgressBar *progress=0; if(chrome) - { - //progress=new ProgressBar(cout, total); cout<<"0 targets built\n"; - } unsigned count=0; bool fail=false; @@ -462,12 +465,6 @@ int Builder::build() Target *tgt=cmdline->get_buildable_target(); if(tgt) { - /*if(chrome) - { - cout<<"\e["<set(count); - cout<<"\e["<build(); if(action) actions.push_back(action); @@ -507,8 +504,6 @@ int Builder::build() } } - //delete progress; - return fail?-1:0; }