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/rule | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 build/rule (limited to 'build/rule') diff --git a/build/rule b/build/rule new file mode 100644 index 0000000..6bb58fe --- /dev/null +++ b/build/rule @@ -0,0 +1,39 @@ +// file : build/rule -*- C++ -*- +// copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef BUILD_RULE +#define BUILD_RULE + +#include +#include // reference_wrapper +#include + +#include + +namespace build +{ + class rule + { + public: + virtual recipe + match (target&) const = 0; + }; + + typedef std::unordered_multimap> rule_map; + + extern rule_map rules; + + class default_path_rule: public rule + { + public: + virtual recipe + match (target&) const; + + static target_state + update (target&); + }; +} + +#endif // BUILD_RULE -- cgit v1.1