aboutsummaryrefslogtreecommitdiff
path: root/build2/target-type
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-16 17:22:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-16 17:22:28 +0200
commit75152526696fc024628796f0633ed695d5ebc49c (patch)
treefaeef54a6b4d7e9a816b8d541500c48484e4ed39 /build2/target-type
parentcc12ed4245a2b61f4c4eb2a970398c920fbc1d37 (diff)
Move exe{} to build2 core, add fallback extensions (existing files)
Diffstat (limited to 'build2/target-type')
-rw-r--r--build2/target-type9
1 files changed, 5 insertions, 4 deletions
diff --git a/build2/target-type b/build2/target-type
index 378fd7c..5e7f59b 100644
--- a/build2/target-type
+++ b/build2/target-type
@@ -31,9 +31,10 @@ namespace build2
// respectively. If the extension function returns NULL, then that means the
// default extension for this target could not be derived.
//
- // The extension is primarily used in two places: search_existing_file()
- // (called for a prerequisite) and in target::derive_path() (called for a
- // target); see their implementations for details.
+ // The extension is used in two places: search_existing_file() (called for a
+ // prerequisite with the last argument true) and in target::derive_path()
+ // (called for a target with the last argument false); see their
+ // implementations for details.
//
struct target_type
{
@@ -41,7 +42,7 @@ namespace build2
const target_type* base;
target* (*factory) (
const target_type&, dir_path, dir_path, string, const string*);
- const string* (*extension) (const target_key&, scope&);
+ const string* (*extension) (const target_key&, scope&, bool search);
void (*print) (ostream&, const target_key&);
target* (*search) (const prerequisite_key&);
bool see_through; // A group with the default "see through" semantics.