diff options
Diffstat (limited to 'build2/depdb')
-rw-r--r-- | build2/depdb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build2/depdb b/build2/depdb index 74b6678..6dec29e 100644 --- a/build2/depdb +++ b/build2/depdb @@ -154,7 +154,17 @@ namespace build2 } string* - expect (const path& v) {return expect (v.string ());} + expect (const path& v) + { + string* l (read ()); + if (l == nullptr || path::traits::compare (*l, v.string ()) != 0) + { + write (v); + return l; + } + + return nullptr; + } string* expect (const char* v) |