aboutsummaryrefslogtreecommitdiff
path: root/build2/version
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-20 15:31:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-07-20 16:10:26 +0200
commitc1dc06dfd1d329f8c6499dbe2166725ab9c35e17 (patch)
tree97449ae7263490473a833944cfeb3d889a2f580d /build2/version
parentb4286df8c9bafdab1934cef99ccc0506ec4555e2 (diff)
Implement bash module
Diffstat (limited to 'build2/version')
-rw-r--r--build2/version/rule.cxx17
-rw-r--r--build2/version/rule.hxx7
2 files changed, 13 insertions, 11 deletions
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 <build2/version/rule.hxx>
-#include <build2/depdb.hxx>
#include <build2/scope.hxx>
#include <build2/target.hxx>
-#include <build2/context.hxx>
-#include <build2/function.hxx>
-#include <build2/algorithm.hxx>
-#include <build2/filesystem.hxx>
#include <build2/diagnostics.hxx>
#include <build2/in/target.hxx>
@@ -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.