aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/search.cxx4
-rw-r--r--build/target8
-rw-r--r--build/target.cxx11
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.