]> git.tdb.fi Git - builder.git/blobdiff - source/builder.cpp
Implement --build-all
[builder.git] / source / builder.cpp
index 11f2b1a0e32a307ab899cd10352e8607a920e7b3..e9491eb8a9bc417c350b6b2f55a378b69bffa7b0 100644 (file)
@@ -78,18 +78,15 @@ Builder::Builder(int argc, char **argv):
        }
 
        dry_run=getopt['n'];
-
        jobs=max(strtol(getopt['j'].arg()), 1L);
-
        chrome=getopt["chrome"];
-
        conf_all=getopt['A'];
+       build_file=getopt['f'].arg();
+       build_all=getopt['B'];
 
        if(getopt['C'])
                chdir(getopt['C'].arg().c_str());
 
-       build_file=getopt['f'].arg();
-
        for(int i=index; i<argc; ++i)
        {
                string v(argv[i]);
@@ -276,10 +273,21 @@ int Builder::main()
                        if(i->second->get_buildable())
                                cout<<'*';
                        unsigned count=0;
+                       unsigned ood_count=0;
                        for(TargetMap::iterator j=targets.begin(); j!=targets.end(); ++j)
                                if(j->second->get_package()==i->second)
+                               {
                                        ++count;
-                       cout<<" ("<<count<<" targets)\n";
+                                       if(j->second->get_rebuild())
+                                               ++ood_count;
+                               }
+                       if(count)
+                       {
+                               cout<<" ("<<count<<" targets";
+                               if(ood_count)
+                                       cout<<", "<<ood_count<<" out-of-date";
+                               cout<<")\n";
+                       }
                }
        }