aboutsummaryrefslogtreecommitdiff
path: root/build2/version/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-17 13:18:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-07-17 13:18:17 +0200
commitfe6f3ec0868185511f5acefb2729eb879798f052 (patch)
tree63a44a73be76ebbdc0be95c72b85756a6442c4eb /build2/version/rule.hxx
parent3a739d4fe0aa7ed1786a93a20c7f43a69b0ebd16 (diff)
Reimplement version::in_rule in terms of in::rule
Significantly, the version::in_rule rule now track changes to the substitution values.
Diffstat (limited to 'build2/version/rule.hxx')
-rw-r--r--build2/version/rule.hxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/build2/version/rule.hxx b/build2/version/rule.hxx
index b01383f..afed11a 100644
--- a/build2/version/rule.hxx
+++ b/build2/version/rule.hxx
@@ -8,28 +8,25 @@
#include <build2/types.hxx>
#include <build2/utility.hxx>
-#include <build2/rule.hxx>
+#include <build2/in/rule.hxx>
#include <build2/install/rule.hxx>
namespace build2
{
namespace version
{
- // Preprocess an .in file.
+ // Preprocess an .in file that depends on manifest.
//
- class in_rule: public rule
+ class in_rule: public in::rule
{
public:
- in_rule () {}
+ in_rule (): rule ("version.in 1", "ver") {}
virtual bool
match (action, target&, const string&) const override;
- virtual recipe
- apply (action, target&) const override;
-
- static target_state
- perform_update (action, const target&);
+ virtual string
+ lookup (const location&, const target&, const string&) const override;
};
// Pre-process manifest before installation to patch in the version.