From 5e9eb843f6ccadfb47fa603260783425da9e7805 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 10 Dec 2014 10:20:26 +0200 Subject: Add rules g++-4.9 -std=c++11 -g -I.. -o bd bd.cxx target.cxx native.cxx rule.cxx cxx/rule.cxx cxx/target.cxx process.cxx timestamp.cxx path.cxx --- build/target.cxx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 build/target.cxx (limited to 'build/target.cxx') diff --git a/build/target.cxx b/build/target.cxx new file mode 100644 index 0000000..e3e3d4d --- /dev/null +++ b/build/target.cxx @@ -0,0 +1,38 @@ +// file : build/target.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#include + +#include + +using namespace std; + +namespace build +{ + // target + // + ostream& + operator<< (ostream& os, const target& t) + { + return os << t.type_id ().name << '{' << t.name () << '}'; + } + + // path_target + // + timestamp path_target:: + load_mtime () const + { + assert (!path_.empty ()); + return path_mtime (path_); + } + + using type_info = target::type_info; + + const type_info target::ti_ {typeid (target), "target", nullptr}; + const type_info mtime_target::ti_ { + typeid (mtime_target), "mtime_target", &target::ti_}; + const type_info path_target::ti_ { + typeid (path_target), "path_target", &mtime_target::ti_}; + const type_info file::ti_ {typeid (file), "file", &path_target::ti_}; +} -- cgit v1.1