summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logic/slbt_exec_install.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 0eddd6d..c4fd40d 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -264,6 +264,12 @@ static int slbt_exec_install_entry(
? -1 : 0;
}
+ /* *dst: consider: cp libfoo.la /dest/dir/libfoo.la */
+ if ((*dst = dest ? 0 : (char *)last->arg))
+ if ((dot = strrchr(last->arg,'.')))
+ if (!(strcmp(dot,".la")))
+ *dst = dstdir;
+
/* srcfile */
if (strlen(entry->arg) + strlen(".libs/") >= (PATH_MAX-1))
return -1;
@@ -279,7 +285,6 @@ static int slbt_exec_install_entry(
/* executable? */
if (fexe) {
*src = srcfile;
- *dst = dest ? 0 : (char *)last->arg;
if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
if (slbt_output_install(dctx,ectx))
@@ -295,7 +300,7 @@ static int slbt_exec_install_entry(
if (slbt_copy_file(dctx,ectx,
srcfile,
- dest ? (char *)dest->arg : (char *)last->arg))
+ dest ? (char *)dest->arg : *dst))
return -1;
/* dot/suffix */