From e270362ceacad49a72cf46394fcb5f010acc41f9 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 27 Oct 2006 07:22:46 +0000 Subject: 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. --- src/targetfile.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/targetfile.cpp b/src/targetfile.cpp index 950fc7b..dacf521 100644 --- a/src/targetfile.cpp +++ b/src/targetfile.cpp @@ -25,6 +25,15 @@ void TargetFile::check( Build &bld ) bld.getView()->beginPerforms( lPerf.size() ); + for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) + { + StringList &reqs = bld.getRequires( (*i)->getTarget() ); + for( StringList::iterator j = reqs.begin(); j != reqs.end(); j++ ) + { + bld.chainTarget( *j ); + } + } + for( PerformList::iterator i = lPerf.begin(); i != lPerf.end(); i++ ) { time_t tTarget = getTime( bld, (*i)->getTarget() ); @@ -32,7 +41,7 @@ void TargetFile::check( Build &bld ) bool bExtras = false; for( StringList::iterator j = reqs.begin(); j != reqs.end(); j++ ) { - bld.chainTarget( *j ); + //bld.chainTarget( *j ); if( getTime( bld, *j ) > tTarget ) { bld.getView()->beginPerform( *i ); -- cgit v1.2.3