From: Mikko Rasa Date: Tue, 4 Oct 2016 14:42:18 +0000 (+0300) Subject: Check DataTransform's directory mtime against cache mtime X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bbd0fd0a91c80a9f2a88992e05f7bb36c0985dca;p=builder.git Check DataTransform's directory mtime against cache mtime Transforms commonly contain wildcard patterns, so the set of source files may change without the transform itself changing. --- diff --git a/source/datatransform.cpp b/source/datatransform.cpp index e45c80a..2f7e875 100644 --- a/source/datatransform.cpp +++ b/source/datatransform.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -16,14 +17,17 @@ DataTransform::DataTransform(Builder &b, const Component &c, const FS::Path &p): FileTarget(b, c.get_package(), p) { component = &c; + + if(FS::Stat st = FS::lstat(FS::dirname(path))) + dir_mtime = st.get_modify_time(); } void DataTransform::find_dependencies() { list files; Cache &cache = component->get_package().get_cache(); - // XXX Should check directory mtime as well - if(mtime