aboutsummaryrefslogtreecommitdiff
path: root/src/targetfile.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-10-27 07:22:46 +0000
committerMike Buland <eichlan@xagasoft.com>2006-10-27 07:22:46 +0000
commite270362ceacad49a72cf46394fcb5f010acc41f9 (patch)
tree5cb20a2eb4d689826eee165fddb44ac9c5b862bc /src/targetfile.cpp
parent001a817e2986789b53b22e42f460d621f97302c2 (diff)
downloadbuild-e270362ceacad49a72cf46394fcb5f010acc41f9.tar.gz
build-e270362ceacad49a72cf46394fcb5f010acc41f9.tar.bz2
build-e270362ceacad49a72cf46394fcb5f010acc41f9.tar.xz
build-e270362ceacad49a72cf46394fcb5f010acc41f9.zip
Try out this update, now it scans the pre-provided requirements of each target
for target chaining before performing any other operations. This means libs will be built before anything may reference them, instead of just the exe.
Diffstat (limited to 'src/targetfile.cpp')
-rw-r--r--src/targetfile.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/targetfile.cpp b/src/targetfile.cpp
index 950fc7b..dacf521 100644
--- a/src/targetfile.cpp
+++ b/src/targetfile.cpp
@@ -27,12 +27,21 @@ void TargetFile::check( Build &bld )
27 27
28 for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) 28 for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ )
29 { 29 {
30 StringList &reqs = bld.getRequires( (*i)->getTarget() );
31 for( StringList::iterator j = reqs.begin(); j != reqs.end(); j++ )
32 {
33 bld.chainTarget( *j );
34 }
35 }
36
37 for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ )
38 {
30 time_t tTarget = getTime( bld, (*i)->getTarget() ); 39 time_t tTarget = getTime( bld, (*i)->getTarget() );
31 StringList &reqs = bld.getRequires( (*i)->getTarget() ); 40 StringList &reqs = bld.getRequires( (*i)->getTarget() );
32 bool bExtras = false; 41 bool bExtras = false;
33 for( StringList::iterator j = reqs.begin(); j != reqs.end(); j++ ) 42 for( StringList::iterator j = reqs.begin(); j != reqs.end(); j++ )
34 { 43 {
35 bld.chainTarget( *j ); 44 //bld.chainTarget( *j );
36 if( getTime( bld, *j ) > tTarget ) 45 if( getTime( bld, *j ) > tTarget )
37 { 46 {
38 bld.getView()->beginPerform( *i ); 47 bld.getView()->beginPerform( *i );