-rw-r--r-- | lib/component_factory.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/component_factory.cc b/lib/component_factory.cc index 2a2eefe..5c18bb7 100644 --- a/lib/component_factory.cc +++ b/lib/component_factory.cc @@ -63,58 +63,64 @@ namespace sitecing { string str; while(!imports.eof()) { imports >> str; if(!str.empty()) deps.push_back(root_intermediate+str+".classname"); } } ifstream ancestors((root_intermediate+nos+".ancestors").c_str(),ios::in); if(ancestors.good()) { string str; while(!ancestors.eof()) { ancestors >> str; if(!str.empty()) deps.push_back(root_intermediate+str+".classname"); } } + // XXX: intermediate_deps should be broken down config_options *co_intermediate_deps = config.lookup_config(nos,config_options::flag_intermediate_deps); if(co_intermediate_deps) { for(list<string>::const_iterator i=co_intermediate_deps->intermediate_deps.begin();i!=co_intermediate_deps->intermediate_deps.end();++i) deps.push_back(*i); } return; }catch(utility_no_suffix& uns) { } } // compiler targets for(int cct=0;cct<sizeof(cc_targets)/sizeof(*cc_targets);cct++) { try { string nos = strip_suffix(noro,cc_targets[cct]); deps.push_back(root_intermediate+nos+".cc"); config_options *co_cpp_deps = config.lookup_config(noro,config_options::flag_cpp_deps); if( (!co_cpp_deps) || co_cpp_deps->cpp_deps) { ifstream df((root_intermediate+noro+".d").c_str(),ios::in); if(df.good()) { string str; while(!df.eof()) { df >> str; if(str.find_first_of("\\:")==string::npos) deps.push_back(combine_path(config.root_source+nos,str)); } } } - // XXX: extra deps like IntermediateDeps? + // XXX: intermediate_deps should be broken down + config_options *co_intermediate_deps = config.lookup_config(nos,config_options::flag_intermediate_deps); + if(co_intermediate_deps) { + for(list<string>::const_iterator i=co_intermediate_deps->intermediate_deps.begin();i!=co_intermediate_deps->intermediate_deps.end();++i) + deps.push_back(*i); + } }catch(utility_no_suffix& uns) { } } }catch(utility_no_prefix& unp) { } } bool component_factory::is_uptodate(const string& dst,file_list_t *deps) { string dp = normalize_path(dst,strip_trailing_slash); // XXX: or just compare it off, instead of throwing things around. try { string noro = strip_prefix(dp,root_intermediate); for(int ppt=0;(ppt+1)<sizeof(pp_targets)/sizeof(*pp_targets);ppt++) { try { string nos = strip_suffix(noro,pp_targets[ppt]); return file_factory::is_uptodate(root_intermediate+nos+".pp_stamp",deps); }catch(utility_no_suffix& uns) { } } |