[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdevelop/parts/autoproject
From:       Amilcar do Carmo Lucas <amilcar () ida ! ing ! tu-bs ! de>
Date:       2003-05-06 8:12:28
[Download RAW message or body]

CVS commit by aclu: 

Recursively build (invoke make) _all_ local (inside the project) dependencies of a \
target before building it.


  M +19 -1     autoprojectpart.cpp   1.87


--- kdevelop/parts/autoproject/autoprojectpart.cpp  #1.86:1.87
@@ -459,5 +459,5 @@ void AutoProjectPart::startMakeCommand(c
 
 /** Adds the make command for the libraries that the target depends on
-  * to the make frontend queue */
+  * to the make frontend queue (this is a recursive function) */
 void AutoProjectPart::queueInternalLibDependenciesBuild(TargetItem* titem)
 {
@@ -492,4 +492,22 @@ void AutoProjectPart::queueInternalLibDe
         tname = dependency.mid(pos+1);
       }
+      kdDebug(9020) << "Scheduling : <" << tdir << ">  target <" << tname << ">" << \
endl; +
+      // Recursively queue the dependencies for building
+      SubprojectItem *spi = m_widget->subprojectItemForPath( dependency.left(pos) );
+      if (spi) {
+        QPtrList< TargetItem > tl = spi->targets;
+        // Cycle throught the list of targets to find the one we're looking for
+        TargetItem *ti = tl.first();
+        do {
+          if (ti->name == tname) {
+            // found it: queue it and stop looking
+            queueInternalLibDependenciesBuild(ti);
+            break;
+          }
+          ti = tl.next();
+        } while (ti);
+      }
+
       tcmd = constructMakeCommandLine(tdir, tname);
       if (!tcmd.isNull()) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic