From bbd0fd0a91c80a9f2a88992e05f7bb36c0985dca Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 4 Oct 2016 17:42:18 +0300 Subject: [PATCH] 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. --- source/datatransform.cpp | 8 ++++++-- source/datatransform.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) 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