]> git.tdb.fi Git - builder.git/commitdiff
Make targets depend on their tools
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 20:27:44 +0000 (23:27 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:55 +0000 (00:08 +0300)
source/target.cpp

index 7646ee4555949f0240d0287ea0a1fff9c54f272a..510dfbdf708fa83cd57ee0426a3b0b1c01fc5a56 100644 (file)
@@ -75,6 +75,11 @@ void Target::prepare()
 
        state = PREPARING;
        find_depends();
+       if(tool)
+       {
+               if(FileTarget *tool_exe = tool->get_executable())
+                       add_depend(tool_exe);
+       }
 
        for(Dependencies::iterator i=depends.begin(); i!=depends.end(); ++i)
                (*i)->prepare();