diff options
Diffstat (limited to '')
-rw-r--r-- | src/builder.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/builder.cpp b/src/builder.cpp index 8e29c81..852d70d 100644 --- a/src/builder.cpp +++ b/src/builder.cpp | |||
@@ -132,18 +132,24 @@ void Builder::debug() | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | printf("Additional dependancies:\n"); | 135 | printf("Dependancies:\n"); |
136 | for( std::map<std::string, std::list<std::string> *>::iterator i = | 136 | for( std::map<std::string, std::list<std::string> *>::iterator i = |
137 | mRequires.begin(); i != mRequires.end(); i++ ) | 137 | mRequires.begin(); i != mRequires.end(); i++ ) |
138 | { | 138 | { |
139 | printf(" %s: ", (*i).first.c_str() ); | 139 | printf(" %s: ", (*i).first.c_str() ); |
140 | std::list<std::string> *pList = (*i).second; | 140 | std::list<std::string> *pList = (*i).second; |
141 | int i = 0; | ||
141 | for( std::list<std::string>::iterator j = pList->begin(); | 142 | for( std::list<std::string>::iterator j = pList->begin(); |
142 | j != pList->end(); j++ ) | 143 | j != pList->end(); j++ ) |
143 | { | 144 | { |
144 | if( j != pList->begin() ) | 145 | if( j != pList->begin() ) |
145 | printf(", "); | 146 | printf(", "); |
146 | printf("%s", (*j).c_str() ); | 147 | printf("%s", (*j).c_str() ); |
148 | if( i++ >= 3 ) | ||
149 | { | ||
150 | printf("..."); | ||
151 | break; | ||
152 | } | ||
147 | } | 153 | } |
148 | printf("\n"); | 154 | printf("\n"); |
149 | } | 155 | } |
@@ -443,6 +449,18 @@ std::list<Rule *> Builder::findRuleChain( Rule *pRule ) | |||
443 | { | 449 | { |
444 | std::list<Rule *> ret; | 450 | std::list<Rule *> ret; |
445 | 451 | ||
452 | for( std::map<const char *, Rule *, ltstr>::iterator i = mRule.begin(); | ||
453 | i != mRule.end(); i++ ) | ||
454 | { | ||
455 | if( pRule == (*i).second ) | ||
456 | continue; | ||
457 | |||
458 | if( pRule->willChain( (*i).second ) ) | ||
459 | { | ||
460 | ret.push_back( (*i).second ); | ||
461 | } | ||
462 | } | ||
463 | |||
446 | return ret; | 464 | return ret; |
447 | } | 465 | } |
448 | 466 | ||