diff options
Diffstat (limited to '')
-rw-r--r-- | src/filetarget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/filetarget.cpp b/src/filetarget.cpp index 7a714a5..0d47e6f 100644 --- a/src/filetarget.cpp +++ b/src/filetarget.cpp | |||
@@ -95,10 +95,13 @@ void FileTarget::check( Builder &bld ) | |||
95 | printf("No dependancies: %s\n", (*i)->getTarget() ); | 95 | printf("No dependancies: %s\n", (*i)->getTarget() ); |
96 | continue; | 96 | continue; |
97 | } | 97 | } |
98 | time_t rebuild = target; | ||
98 | for( std::list<std::string>::iterator j = lReqs->begin(); | 99 | for( std::list<std::string>::iterator j = lReqs->begin(); |
99 | j != lReqs->end(); j++ ) | 100 | j != lReqs->end(); j++ ) |
100 | { | 101 | { |
101 | time_t srcfile = getTime( bld, *j ); | 102 | time_t srcfile = getTime( bld, *j ); |
103 | if( srcfile < rebuild ) | ||
104 | rebuild = srcfile; | ||
102 | if( srcfile > target ) | 105 | if( srcfile > target ) |
103 | { | 106 | { |
104 | bld.view().beginExecute(); | 107 | bld.view().beginExecute(); |
@@ -114,7 +117,7 @@ void FileTarget::check( Builder &bld ) | |||
114 | if( k == lReqs->end() ) | 117 | if( k == lReqs->end() ) |
115 | { | 118 | { |
116 | bExtraReqs = true; | 119 | bExtraReqs = true; |
117 | bld.genRequiresFor( (*i)->getTarget(), srcfile ); | 120 | bld.genRequiresFor( (*i)->getTarget(), rebuild ); |
118 | } | 121 | } |
119 | } | 122 | } |
120 | } | 123 | } |