aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/build.cpp5
-rw-r--r--src/build.h1
-rw-r--r--src/buildparser.cpp18
3 files changed, 24 insertions, 0 deletions
diff --git a/src/build.cpp b/src/build.cpp
index a7421de..113f61f 100644
--- a/src/build.cpp
+++ b/src/build.cpp
@@ -429,3 +429,8 @@ void Build::addToGroup( const std::string &sGroup, Target *pTarget )
429 mGroup[sGroup].push_back( pTarget ); 429 mGroup[sGroup].push_back( pTarget );
430} 430}
431 431
432bool Build::hasAction( const std::string &str )
433{
434 return mAction.find( str ) != mAction.end();
435}
436
diff --git a/src/build.h b/src/build.h
index 768d211..0bbad0e 100644
--- a/src/build.h
+++ b/src/build.h
@@ -45,6 +45,7 @@ public:
45 void addRequires( const std::string &who, const std::string &what ); 45 void addRequires( const std::string &who, const std::string &what );
46 void addRule( Rule *pRule ); 46 void addRule( Rule *pRule );
47 void addAction( Action *pAction ); 47 void addAction( Action *pAction );
48 bool hasAction( const std::string &str );
48 void addToGroup( const std::string &sGroup, Target *pTarget ); 49 void addToGroup( const std::string &sGroup, Target *pTarget );
49 50
50 void set( const std::string &cont, const std::string &var, const std::string &val ); 51 void set( const std::string &cont, const std::string &var, const std::string &val );
diff --git a/src/buildparser.cpp b/src/buildparser.cpp
index 50fc0fc..a00bd73 100644
--- a/src/buildparser.cpp
+++ b/src/buildparser.cpp
@@ -590,6 +590,24 @@ Build *BuildParser::genBuild()
590 bld->addAction( pAct ); 590 bld->addAction( pAct );
591 } 591 }
592 592
593 // Now create an auto check-action for each group where there isn't already
594 // an action.
595 for( TargetTmpList::iterator i = lTargetTmp.begin();
596 i != lTargetTmp.end(); i++ )
597 {
598 for( StringList::iterator j = (*i).second.lGroups.begin();
599 j != (*i).second.lGroups.end(); j++ )
600 {
601 if( !bld->hasAction( (*j) ) )
602 {
603 Action *pAct = new Action;
604 pAct->setName( *j );
605 pAct->addCommand( Action::actCheck, *j, true );
606 bld->addAction( pAct );
607 }
608 }
609 }
610
593 return bld; 611 return bld;
594} 612}
595 613