From fe6f3ec0868185511f5acefb2729eb879798f052 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Jul 2018 13:18:17 +0200 Subject: Reimplement version::in_rule in terms of in::rule Significantly, the version::in_rule rule now track changes to the substitution values. --- build2/version/rule.hxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'build2/version/rule.hxx') 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 #include -#include +#include #include 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. -- cgit v1.1