X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fobjectfile.cpp;h=2aab39b430906eec4f2bde29ed1a0357c1af7dab;hb=74266a6e650f019063cdcd1c9a7bd26d8f99041b;hp=874f06925e56343c4e9e7ce5afe0911cd3a025e2;hpb=1a46151c99a406123c4ddfc797a7841baf3e4cc2;p=builder.git diff --git a/source/objectfile.cpp b/source/objectfile.cpp index 874f069..2aab39b 100644 --- a/source/objectfile.cpp +++ b/source/objectfile.cpp @@ -19,6 +19,12 @@ ObjectFile::ObjectFile(Builder &b, const Component &c, SourceFile &src): add_depend(&src); } +/** +Processes as many new dependences as possible. Some may be left unprocessed +if their own dependencies are not ready, requiring another call to this +function. Use the get_deps_ready() function to determine whether this is the +case. +*/ void ObjectFile::find_depends() { for(TargetList::iterator i=new_deps.begin(); i!=new_deps.end();) @@ -41,6 +47,9 @@ Action *ObjectFile::build() return Target::build(new Compile(builder, *this)); } +/** +Recursively looks for header targets and adds them as dependencies. +*/ void ObjectFile::find_depends(Target *tgt) { const string &tname=tgt->get_name(); @@ -65,6 +74,9 @@ void ObjectFile::find_depends(Target *tgt) } } +/** +Adds a target to the dependency list as well as the new dependencies list. +*/ void ObjectFile::add_depend(Target *tgt) { Target::add_depend(tgt);