diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/bin/module.cxx | 3 | ||||
-rw-r--r-- | build/cxx/link.cxx | 19 |
2 files changed, 19 insertions, 3 deletions
diff --git a/build/bin/module.cxx b/build/bin/module.cxx index e17463c..5f65b8d 100644 --- a/build/bin/module.cxx +++ b/build/bin/module.cxx @@ -57,6 +57,8 @@ namespace build v.find ("bin.liba.lib", strings_type); v.find ("bin.libso.lib", strings_type); v.find ("bin.rpath", strings_type); //@@ VAR paths_type + + v.find ("bin.libprefix", string_type); } // Register target types. @@ -152,6 +154,7 @@ namespace build if (const value& v = config::optional (r, "config.bin.rpath")) b.assign ("bin.rpath") += as<strings> (v); + // Configure "installability" of our target types. // install::path<exe> (b, dir_path ("bin")); // Install into install.bin. diff --git a/build/cxx/link.cxx b/build/cxx/link.cxx index a00b92e..f5a2e3d 100644 --- a/build/cxx/link.cxx +++ b/build/cxx/link.cxx @@ -461,11 +461,24 @@ namespace build // if (t.path ().empty ()) { + auto l (t["extension"]); + const char* e (l ? as<string> (*l).c_str () : nullptr); + switch (lt) { - case type::e: t.derive_path ("" ); break; - case type::a: t.derive_path ("a", "lib"); break; - case type::so: t.derive_path ("so", "lib"); break; + case type::e: + { + t.derive_path (e != nullptr ? e : ""); + break; + } + case type::a: + case type::so: + { + auto l (t["bin.libprefix"]); + t.derive_path (e != nullptr ? e : (lt == type::a ? "a" : "so"), + l ? as<string> (*l).c_str () : "lib"); + break; + } } } |