summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_install.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-11 19:10:55 -0400
committermidipix <writeonce@midipix.org>2016-04-11 19:10:55 -0400
commitb107e2e6ab48cc46277b5ae27cc33c6cd116de60 (patch)
treea96f111b2e378e635c5836b8b8399435beb97790 /src/logic/slbt_exec_install.c
parent867d1e60472f9290ca7b99ec252e1bbf83a8c94c (diff)
downloadslibtool-b107e2e6ab48cc46277b5ae27cc33c6cd116de60.tar.bz2
slibtool-b107e2e6ab48cc46277b5ae27cc33c6cd116de60.tar.xz
install mode: added -avoid-version support.
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r--src/logic/slbt_exec_install.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index cf9ba77..e5a9d9e 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -168,8 +168,29 @@ static int slbt_exec_install_entry(
base = slnkname;
/* source (build) symlink target */
- if (readlink(slnkname,target,sizeof(target)) <= 0)
- return -1;
+ if (readlink(slnkname,target,sizeof(target)) <= 0) {
+ /* -avoid-version? */
+ if (stat(slnkname,&st))
+ return -1;
+
+ /* dstfile */
+ if ((size_t)snprintf(dstfile,sizeof(dstfile),"%s/%s",
+ dstdir,base) >= sizeof(dstfile))
+ return -1;
+
+ /* single spawn, no symlinks */
+ *src = slnkname;
+ *dst = dest ? 0 : dstfile;
+
+ if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
+ if (slbt_output_install(dctx,ectx))
+ return -1;
+
+ if (((ret = slbt_spawn(ectx,true)) < 0) || ectx->exitcode)
+ return -1;
+
+ return 0;
+ }
/* srcfile: .libs/libfoo.so.x.y.z */
slash = strrchr(srcfile,'/');