From b792e9f4b32013c258fd78bc3271dd6730fccda3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 23 Nov 2006 14:31:22 +0000 Subject: Minor tweak keeps the same old behavior for check, but makes clean remove everything in the produces list. --- src/rule.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/rule.cpp') diff --git a/src/rule.cpp b/src/rule.cpp index 61ea632..2f87d85 100644 --- a/src/rule.cpp +++ b/src/rule.cpp @@ -12,7 +12,7 @@ Rule::~Rule() { } -StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) +StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf, bool bFirstOnly ) { StringList lOutput; @@ -21,7 +21,7 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) for( RuleList::iterator i = rl.begin(); i != rl.end(); i++ ) { (*i)->setTarget( sTarget ); - StringList tmp = (*i)->execute( bld, lInput, lPerf ); + StringList tmp = (*i)->execute( bld, lInput, lPerf, bFirstOnly ); lOutput.insert( lOutput.end(), tmp.begin(), tmp.end() ); } @@ -84,9 +84,9 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) { for( StringList::iterator i = lMine.begin(); i != lMine.end(); i++ ) { - //for( StringList::iterator j = lProduces.begin(); - // j != lProduces.end(); j++ ) - StringList::iterator j = lProduces.begin(); + for( StringList::iterator j = lProduces.begin(); + j != lProduces.end(); j++ ) + //StringList::iterator j = lProduces.begin(); { VarMap mTmp; StringList cont; @@ -121,6 +121,8 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf ) } lPerf.push_back( p ); } + if( bFirstOnly ) + break; } } } -- cgit v1.2.3