From db3534da1bcbf286df7ac4c8736f5c5157399ced Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 17 Jul 2016 08:18:45 +0200 Subject: Redesign obj to exe/lib mapping Specifically: * objso{} and libso{} target types have been renamed to objs{} and libs{} * obje{} has been added (so now we have obje{}, obja{}, and objs{}) * obje{} is now used for building exe{} * object file extensions have been changed to use "hierarchical extensions" that reflect the extension of the corresponding exe/lib target (instead of the -so suffix we used), specifically: obje{}: foo.o, (UNIX), foo.exe.o (MinGW), foo.exe.obj (Windows) obja{}: foo.a.o (UNIX, MinGW), foo.lib.obj (Windows) objs{}: foo.so.o (UNIX), foo.dylib.o (Darwin), foo.dll.o (MinGW), foo.dll.obj (Windows) --- build2/cxx/install.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'build2/cxx/install.cxx') diff --git a/build2/cxx/install.cxx b/build2/cxx/install.cxx index f6f502a..e07d115 100644 --- a/build2/cxx/install.cxx +++ b/build2/cxx/install.cxx @@ -6,8 +6,9 @@ #include -#include #include +#include +#include using namespace std; @@ -31,17 +32,20 @@ namespace build2 // If this is a shared library prerequisite, install it as long as it // is in the same amalgamation as we are. // - if ((t.is_a () || t.is_a ()) && - (p.is_a () || p.is_a ())) + // @@ Shouldn't we also install a static library prerequisite of a + // static library? + // + if ((t.is_a () || t.is_a ()) && + (p.is_a () || p.is_a ())) { target* pt (&p.search ()); // If this is the lib{} group, pick a member which we would link. // if (lib* l = pt->is_a ()) - pt = &link::link_member (*l, link::link_order (t)); + pt = &link_member (*l, link_order (t.base_scope (), link_type (t))); - if (pt->is_a ()) // Can be liba{}. + if (pt->is_a ()) // Can be liba{}. return pt->in (t.weak_scope ()) ? pt : nullptr; } -- cgit v1.1