From 3fd36c27e9455dae10ed4f569ca4362219bbcbcb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Sep 2018 16:10:21 +0200 Subject: Initial work on binless (binary-less aka header-only) library support --- build2/cc/install-rule.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'build2/cc/install-rule.cxx') diff --git a/build2/cc/install-rule.cxx b/build2/cc/install-rule.cxx index d687903..b2b508e 100644 --- a/build2/cc/install-rule.cxx +++ b/build2/cc/install-rule.cxx @@ -174,7 +174,7 @@ namespace build2 else // install or uninstall { // Derive shared library paths and cache them in the target's aux - // storage if we are un/installing (used in *_extra() functions + // storage if we are un/installing (used in the *_extra() functions // below). // static_assert (sizeof (link_rule::libs_paths) <= target::data_size, @@ -183,12 +183,15 @@ namespace build2 file* f; if ((f = t.is_a ()) != nullptr && tclass != "windows") { - const string* p (cast_null (t["bin.lib.prefix"])); - const string* s (cast_null (t["bin.lib.suffix"])); - t.data ( - link_.derive_libs_paths (*f, - p != nullptr ? p->c_str (): nullptr, - s != nullptr ? s->c_str (): nullptr)); + if (!f->path ().empty ()) // Not binless. + { + const string* p (cast_null (t["bin.lib.prefix"])); + const string* s (cast_null (t["bin.lib.suffix"])); + t.data ( + link_.derive_libs_paths (*f, + p != nullptr ? p->c_str (): nullptr, + s != nullptr ? s->c_str (): nullptr)); + } } } -- cgit v1.1