From ee0456ed4a5f3f6686fbb0a433161d1f9d8535fe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Jul 2019 07:30:23 +0200 Subject: Remove libu{} target group The semantics provided by libu{} is rarely required and as result was not yet documented. However, if you are using it, the new way to achieve the same result is to use both libue{} and libul{} explicitly, for example: exe{foo}: libue{foo} lib{foo}: libul{foo} {libue libul}{foo}: cxx{*} --- build2/bin/target.cxx | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'build2/bin/target.cxx') diff --git a/build2/bin/target.cxx b/build2/bin/target.cxx index 46f19bd..7c16506 100644 --- a/build2/bin/target.cxx +++ b/build2/bin/target.cxx @@ -215,33 +215,11 @@ namespace build2 false }; - // libu*{} member factory. - // - template - static target* - libux_factory (const target_type&, dir_path dir, dir_path out, string n) - { - const target* g (targets.find (dir, out, n)); - - if (const target* g2 = targets.find (dir, out, n)) - { - if (g != 0) - fail << "both " << *g << " and " << *g2 << " targets declared"; - - g = g2; - } - - M* m (new M (move (dir), move (out), move (n))); - m->group = g; - - return m; - } - const target_type libue::static_type { "libue", &libux::static_type, - &libux_factory, + &target_factory, nullptr, /* fixed_extension */ &target_extension_var, &target_pattern_var, @@ -254,7 +232,7 @@ namespace build2 { "libua", &libux::static_type, - &libux_factory, + &m_factory, nullptr, /* fixed_extension */ &target_extension_var, &target_pattern_var, @@ -267,7 +245,7 @@ namespace build2 { "libus", &libux::static_type, - &libux_factory, + &m_factory, nullptr, /* fixed_extension */ &target_extension_var, &target_pattern_var, @@ -375,11 +353,12 @@ namespace build2 false }; +#if 0 const target_type libu::static_type { "libu", &libx::static_type, - &g_factory, + &target_factory, nullptr, nullptr, nullptr, @@ -387,6 +366,7 @@ namespace build2 &target_search, false }; +#endif // What extensions should we use? At the outset, this is platform- // dependent. And if we consider cross-compilation, is it build or -- cgit v1.1