diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-27 13:59:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-27 13:59:51 +0200 |
commit | a5949f9e974171144dba84771a9f305f9e1dcc3f (patch) | |
tree | 1e70c60d0c9daf4065e1163426c65b512d70c0c6 /build2/search.cxx | |
parent | bb171dd3fa145b15a6defd122b15be6822806e2b (diff) |
Rework default extension derivation, again
Diffstat (limited to 'build2/search.cxx')
-rw-r--r-- | build2/search.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/build2/search.cxx b/build2/search.cxx index 2ab3d1f..3df8877 100644 --- a/build2/search.cxx +++ b/build2/search.cxx @@ -71,20 +71,18 @@ namespace build2 { if (auto f = ctk.type->extension) { - ext = &f (ctk, *cpk.scope); // Already from the pool. + ext = f (ctk, *cpk.scope); // Already from the pool. } - else + + if (ext == nullptr) { // What should we do here, fail or say we didn't find anything? - // Current think is that if the target type didn't provide the - // default extension, then it doesn't want us to search for an - // existing file (of course, if the user specified the extension - // explicitly, we will still do so). But let me know what you - // think. + // Current think is that if the target type couldn't find the default + // extension, then we simply shouldn't search for any existing files + // (of course, if the user specified the extension explicitly, we will + // still do so). // - //fail << "no default extension for prerequisite " << cpk; - level4 ([&]{trace << "no existing file found for prerequisite " - << cpk;}); + level4 ([&]{trace << "no existing file for prerequisite " << cpk;}); return nullptr; } } @@ -134,7 +132,7 @@ namespace build2 return &t; } - level4 ([&]{trace << "no existing file found for prerequisite " << cpk;}); + level4 ([&]{trace << "no existing file for prerequisite " << cpk;}); return nullptr; } |