diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-18 17:27:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-18 17:27:25 +0200 |
commit | 902f3763af4931c5c04c47d10e4d24dba96487cd (patch) | |
tree | 9b91c7e1636bdaf5b3f6b1800a0793977ecacd46 /build | |
parent | 501ce5993f3d52208696c81248829247da7b46b5 (diff) |
Move path_mtime to filesystem, rename file_mtime, follow symlinks
Diffstat (limited to 'build')
-rw-r--r-- | build/search.cxx | 4 | ||||
-rw-r--r-- | build/target | 8 | ||||
-rw-r--r-- | build/target.cxx | 11 |
3 files changed, 15 insertions, 8 deletions
diff --git a/build/search.cxx b/build/search.cxx index ee6e20f..feff123 100644 --- a/build/search.cxx +++ b/build/search.cxx @@ -7,6 +7,8 @@ #include <utility> // move() #include <cassert> +#include <butl/filesystem> + #include <build/scope> #include <build/target> #include <build/prerequisite> @@ -78,7 +80,7 @@ namespace build f += e; } - timestamp mt (path_mtime (f)); + timestamp mt (file_mtime (f)); if (mt == timestamp_nonexistent) continue; diff --git a/build/target b/build/target index 9388065..54b9daf 100644 --- a/build/target +++ b/build/target @@ -520,10 +520,6 @@ namespace build const char* name_prefix = nullptr, const char* name_suffix = nullptr); - protected: - virtual timestamp - load_mtime () const; - public: static const target_type static_type; @@ -538,6 +534,10 @@ namespace build public: using path_target::path_target; + protected: + virtual timestamp + load_mtime () const; + public: virtual const target_type& type () const {return static_type;} static const target_type static_type; diff --git a/build/target.cxx b/build/target.cxx index 3810092..1040443 100644 --- a/build/target.cxx +++ b/build/target.cxx @@ -4,6 +4,8 @@ #include <build/target> +#include <butl/filesystem> + #include <build/scope> #include <build/search> #include <build/algorithm> @@ -268,11 +270,14 @@ namespace build return dir / path_type (move (n)); } - timestamp path_target:: + // file_target + // + timestamp file:: load_mtime () const { - assert (!path_.empty ()); - return path_mtime (path_); + const path_type& f (path ()); + assert (!f.empty ()); + return file_mtime (f); } // Search functions. |