-rw-r--r-- | lib/file_factory.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/file_factory.cc b/lib/file_factory.cc index c6b5748..7ca7b86 100644 --- a/lib/file_factory.cc +++ b/lib/file_factory.cc | |||
@@ -18,38 +18,39 @@ namespace sitecing { | |||
18 | struct stat stdst; | 18 | struct stat stdst; |
19 | if(stat(dst.c_str(),&stdst)) | 19 | if(stat(dst.c_str(),&stdst)) |
20 | return false; | 20 | return false; |
21 | for(file_list_t::const_iterator i=fl->begin();i!=fl->end();i++) { | 21 | for(file_list_t::const_iterator i=fl->begin();i!=fl->end();i++) { |
22 | struct stat stdep; | 22 | struct stat stdep; |
23 | if(stat(i->c_str(),&stdep)) | 23 | if(stat(i->c_str(),&stdep)) |
24 | return false; | 24 | return false; |
25 | if(stdst.st_mtime<stdep.st_mtime) | 25 | if(stdst.st_mtime<stdep.st_mtime) |
26 | return false; | 26 | return false; |
27 | if(!is_uptodate(*i)) | 27 | if(!is_uptodate(*i)) |
28 | return false; | 28 | return false; |
29 | } | 29 | } |
30 | return true; | 30 | return true; |
31 | } | 31 | } |
32 | 32 | ||
33 | void file_factory::make(const string& dst) { | 33 | void file_factory::make(const string& dst) { |
34 | try { | 34 | try { |
35 | depth++; | 35 | depth++; |
36 | if(depth>25) | 36 | if(depth>25) |
37 | throw konforka::exception(CODEPOINT,"recursed too deeply."); | 37 | throw konforka::exception(CODEPOINT,"recursed too deeply."); |
38 | file_list_t deps; | 38 | file_list_t deps; |
39 | if(!is_uptodate(dst,&deps)) { | 39 | if(!is_uptodate(dst,&deps)) { |
40 | for(file_list_t::const_iterator i=deps.begin();i!=deps.end();i++) | 40 | for(file_list_t::const_iterator i=deps.begin();i!=deps.end();i++) |
41 | make(*i); | 41 | make(*i); |
42 | build(dst); | 42 | if(!is_uptodate(dst,&deps)) |
43 | build(dst); | ||
43 | } | 44 | } |
44 | depth--; | 45 | depth--; |
45 | }catch(konforka::exception& ke) { | 46 | }catch(konforka::exception& ke) { |
46 | depth--; | 47 | depth--; |
47 | ke.see(CODEPOINT); | 48 | ke.see(CODEPOINT); |
48 | throw; | 49 | throw; |
49 | }catch(...) { | 50 | }catch(...) { |
50 | depth--; | 51 | depth--; |
51 | throw; | 52 | throw; |
52 | } | 53 | } |
53 | } | 54 | } |
54 | 55 | ||
55 | } | 56 | } |