diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 14:46:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-01 14:46:45 +0200 |
commit | 10fd2aface4486fc7f873dd2b54a1c2073c0b434 (patch) | |
tree | 5133810cf33b3e4ba4dfe78f659ee65599c31ffd /build/bin | |
parent | 7996c2bfc2d7e998e2f9f1236d457ec7bea8ad8a (diff) |
Reimplement define as dynamic derivation rather than alias
New syntax:
define cli: file
The rationale is we need to be able to assign the file extension (using
type/pattern-specific variables). And if it is an alias, we will assign
it to the original target type.
Note that we could still support aliases if we need to. Will need to
bring back the id member in target_type that would normally point to
itself but for an alias would point to the origin.
Diffstat (limited to 'build/bin')
-rw-r--r-- | build/bin/target.cxx | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/build/bin/target.cxx b/build/bin/target.cxx index c2c5e05..6f2d7b5 100644 --- a/build/bin/target.cxx +++ b/build/bin/target.cxx @@ -24,14 +24,12 @@ namespace build const target_type obja::static_type { - typeid (obja), "obja", &file::static_type, &obja_factory, nullptr, &search_target, // Note: not _file(); don't look for an existing file. - false, - nullptr + false }; static target* @@ -48,14 +46,12 @@ namespace build const target_type objso::static_type { - typeid (objso), "objso", &file::static_type, &objso_factory, nullptr, &search_target, // Note: not _file(); don't look for an existing file. - false, - nullptr + false }; static target* @@ -76,26 +72,22 @@ namespace build const target_type obj::static_type { - typeid (obj), "obj", &target::static_type, &obj_factory, nullptr, &search_target, - false, - nullptr + false }; const target_type exe::static_type { - typeid (exe), "exe", &file::static_type, &target_factory<exe>, nullptr, &search_file, - false, - nullptr + false }; static target* @@ -125,14 +117,12 @@ namespace build constexpr const char a_ext[] = "a"; const target_type liba::static_type { - typeid (liba), "liba", &file::static_type, &liba_factory, &target_extension_fix<a_ext>, &search_file, - false, - nullptr + false }; static target* @@ -150,14 +140,12 @@ namespace build constexpr const char so_ext[] = "so"; const target_type libso::static_type { - typeid (libso), "libso", &file::static_type, &libso_factory, &target_extension_fix<so_ext>, &search_file, - false, - nullptr + false }; // lib @@ -187,14 +175,12 @@ namespace build const target_type lib::static_type { - typeid (lib), "lib", &target::static_type, &lib_factory, nullptr, &search_target, - false, - nullptr + false }; } } |