From c1dc06dfd1d329f8c6499dbe2166725ab9c35e17 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 20 Jul 2018 15:31:13 +0200 Subject: Implement bash module --- build2/version/rule.cxx | 17 ++++++++--------- build2/version/rule.hxx | 7 +++++-- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'build2/version') diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index a0ff1e2..262d623 100644 --- a/build2/version/rule.cxx +++ b/build2/version/rule.cxx @@ -4,13 +4,8 @@ #include -#include #include #include -#include -#include -#include -#include #include #include @@ -88,7 +83,10 @@ namespace build2 } string in_rule:: - lookup (const location& l, const target& t, const string& n) const + lookup (const location& l, + action a, + const target& t, + const string& n) const { // Note that this code will be executed during up-to-date check for each // substitution so let's try not to do anything overly sub-optimal here. @@ -105,9 +103,10 @@ namespace build2 if (p == string::npos || n.compare (0, p, m.project) == 0) { - // Standard lookup. - // - return rule::lookup (l, t, p == string::npos ? n : string (n, p + 1)); + return rule::lookup (l, // Standard lookup. + a, + t, + p == string::npos ? n : string (n, p + 1)); } string pn (n, 0, p); diff --git a/build2/version/rule.hxx b/build2/version/rule.hxx index afed11a..c3b41be 100644 --- a/build2/version/rule.hxx +++ b/build2/version/rule.hxx @@ -20,13 +20,16 @@ namespace build2 class in_rule: public in::rule { public: - in_rule (): rule ("version.in 1", "ver") {} + in_rule (): rule ("version.in 1", "version.in") {} virtual bool match (action, target&, const string&) const override; virtual string - lookup (const location&, const target&, const string&) const override; + lookup (const location&, + action, + const target&, + const string&) const override; }; // Pre-process manifest before installation to patch in the version. -- cgit v1.1