]> git.tdb.fi Git - builder.git/blobdiff - source/filetarget.h
Move the Component reference to Target and make it a pointer
[builder.git] / source / filetarget.h
index 982b8cb6abce166751d05cd4f5c4b82021503d56..4363d5a8672f5e8dfbad647570acbe1f22212db5 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef FILETARGET_H_
 #define FILETARGET_H_
 
@@ -19,12 +12,24 @@ class FileTarget: public Target
 {
 protected:
        Msp::FS::Path path;
+       Msp::Time::TimeStamp mtime;
        unsigned size;
 
        FileTarget(Builder &, const Package *, const Msp::FS::Path &);
 public:
        const Msp::FS::Path &get_path() const { return path; }
+       const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
        unsigned get_size() const { return size; }
+
+       /**
+       Changes the mtime of the target to the current time.
+       */
+       void touch();
+
+protected:
+       virtual void check_rebuild();
+private:
+       std::string make_name(const Package *, const Msp::FS::Path &);
 };
 
 #endif