aboutsummaryrefslogtreecommitdiff
path: root/src/rule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.cpp')
-rw-r--r--src/rule.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/rule.cpp b/src/rule.cpp
index 2f87d85..7924ba4 100644
--- a/src/rule.cpp
+++ b/src/rule.cpp
@@ -3,6 +3,8 @@
3#include "function.h" 3#include "function.h"
4#include "perform.h" 4#include "perform.h"
5 5
6#include <set>
7
6Rule::Rule() : 8Rule::Rule() :
7 pAggregate( NULL ) 9 pAggregate( NULL )
8{ 10{
@@ -46,6 +48,23 @@ StringList Rule::execute( Build &bld, StringList &lInput, PerformList &lPerf, bo
46 lProduces.push_back( sTarget ); 48 lProduces.push_back( sTarget );
47 } 49 }
48 50
51 {
52 std::set<std::string> sUsed;
53 for( StringList::iterator i = lInput.begin(); i != lInput.end(); i++ )
54 {
55isuck: if( i == lInput.end() ) break;
56 if( sUsed.find( *i ) != sUsed.end() )
57 {
58 StringList::iterator j = i;
59 j++;
60 lInput.erase( i );
61 i = j;
62 goto isuck;
63 }
64 sUsed.insert( *i );
65 }
66 }
67
49 StringList lNewOut; 68 StringList lNewOut;
50 if( pAggregate ) 69 if( pAggregate )
51 { 70 {