diff options
author | midipix <writeonce@midipix.org> | 2016-04-11 19:10:55 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-11 19:10:55 -0400 |
commit | b107e2e6ab48cc46277b5ae27cc33c6cd116de60 (patch) | |
tree | a96f111b2e378e635c5836b8b8399435beb97790 /src | |
parent | 867d1e60472f9290ca7b99ec252e1bbf83a8c94c (diff) | |
download | slibtool-b107e2e6ab48cc46277b5ae27cc33c6cd116de60.tar.bz2 slibtool-b107e2e6ab48cc46277b5ae27cc33c6cd116de60.tar.xz |
install mode: added -avoid-version support.
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/slbt_exec_install.c | 25 |
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,'/'); |