aboutsummaryrefslogtreecommitdiff
path: root/build/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-02 14:24:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-02 14:45:13 +0200
commitbecea217436a79b7ef37a023da6cb4c560225a71 (patch)
tree5017f0ad3bc4d78ad737f4dc2b8b2036bb5f5664 /build/target.cxx
parent685fe65f6b26b9e57c3d10cfe68c66d8baff8a68 (diff)
Redo extension derivation for file{}, doc{}, and cli{}
We now first check the 'extension' variable, then use the default.
Diffstat (limited to 'build/target.cxx')
-rw-r--r--build/target.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/target.cxx b/build/target.cxx
index 5c31311..41fe54a 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -433,13 +433,15 @@ namespace build
(e != nullptr ? e : &extension_pool.find ("")));
}
- constexpr const char extension_var[] = "extension";
+ constexpr const char file_ext_var[] = "extension";
+ constexpr const char file_ext_def[] = "";
+
const target_type file::static_type
{
"file",
&path_target::static_type,
&file_factory<file>,
- &target_extension_var<extension_var>,
+ &target_extension_var<file_ext_var, file_ext_def>,
&search_file,
false
};
@@ -493,13 +495,12 @@ namespace build
false
};
- constexpr const char doc_ext[] = "";
const target_type doc::static_type
{
"doc",
&file::static_type,
&file_factory<doc>,
- &target_extension_fix<doc_ext>,
+ &target_extension_var<file_ext_var, file_ext_def>, // Same as file.
&search_file,
false
};