Merge pull request #1598 from elly/cargo

[cargo] detect libs properly
This commit is contained in:
Brian Anderson 2012-01-21 13:24:53 -08:00
commit 29bebd3e9f
1 changed files with 3 additions and 6 deletions

View File

@ -367,12 +367,8 @@ fn test_one_crate(_c: cargo, _path: str, cf: str, _p: pkg) {
ret;
}
let new = fs::list_dir(buildpath);
let exec_suffix = os::exec_suffix();
for ct: str in new {
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
(exec_suffix == "" && !str::starts_with(ct, "./lib")) {
run::run_program(ct, []);
}
run::run_program(ct, []);
}
}
@ -389,7 +385,8 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
let exec_suffix = os::exec_suffix();
for ct: str in new {
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
(exec_suffix == "" && !str::starts_with(ct, "./lib")) {
(exec_suffix == "" && !str::starts_with(fs::basename(ct),
"lib")) {
#debug(" bin: %s", ct);
// FIXME: need libstd fs::copy or something
run::run_program("cp", [ct, c.bindir]);