summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-24 21:15:09 -0400
committermidipix <writeonce@midipix.org>2016-04-24 21:15:09 -0400
commit9cce846a4cc2b905f0f639e1b49fbe9301cf2294 (patch)
treefe40ecbfbeab3165d77192e557315f89fc890ded
parente39fca3756d1480bd0304b5c9135705629fd0630 (diff)
downloadslibtool-9cce846a4cc2b905f0f639e1b49fbe9301cf2294.tar.bz2
slibtool-9cce846a4cc2b905f0f639e1b49fbe9301cf2294.tar.xz
install mode: properly handle SRC and DEST being libfoo.la and /dest/libfoo.la.
-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 */