aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/rule
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-12-10 10:20:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-12-10 10:20:26 +0200
commit5e9eb843f6ccadfb47fa603260783425da9e7805 (patch)
tree3778f76de37f5258a07a8fae0e58a843b8a49f1d /build/cxx/rule
parent20e3aedeb7df742c38276fb41cae8f3eb027b6dd (diff)
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
Diffstat (limited to 'build/cxx/rule')
-rw-r--r--build/cxx/rule40
1 files changed, 40 insertions, 0 deletions
diff --git a/build/cxx/rule b/build/cxx/rule
new file mode 100644
index 0000000..d4412e4
--- /dev/null
+++ b/build/cxx/rule
@@ -0,0 +1,40 @@
+// file : build/cxx/rule -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BUILD_CXX_RULE
+#define BUILD_CXX_RULE
+
+#include <build/rule>
+
+namespace build
+{
+ namespace cxx
+ {
+ // @@ Can't we do match(obj&) and then registration code extracts
+ // that. And no virtuals.
+ //
+
+ class compile: public rule
+ {
+ public:
+ virtual recipe
+ match (target&) const;
+
+ static target_state
+ update (target&);
+ };
+
+ class link: public rule
+ {
+ public:
+ virtual recipe
+ match (target&) const;
+
+ static target_state
+ update (target&);
+ };
+ }
+}
+
+#endif // BUILD_CXX_RULE