summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_install.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 3cf0e12..f87db59 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -340,6 +340,7 @@ static int slbt_exec_install_entry(
bool fexe = false;
bool fpe;
bool frelease;
+ bool farchive;
size_t slen;
struct stat st;
@@ -419,12 +420,6 @@ static int slbt_exec_install_entry(
dot = strrchr(srcfile,'.');
strcpy(dot,dctx->cctx->settings.arsuffix);
- if (!(dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC))
- if (slbt_copy_file(dctx,ectx,
- srcfile,
- dest ? (char *)dest->arg : *dst))
- return SLBT_NESTED_ERROR(dctx);
-
/* dot/suffix */
strcpy(slnkname,srcfile);
dot = strrchr(slnkname,'.');
@@ -436,6 +431,20 @@ static int slbt_exec_install_entry(
/* libfoo.a --> libfoo.so */
strcpy(dot,dsosuffix);
+ /* libfoo.a installation */
+ if (!(dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC))
+ farchive = true;
+ else if (slbt_symlink_is_a_placeholder(slnkname))
+ farchive = true;
+ else
+ farchive = false;
+
+ if (farchive)
+ if (slbt_copy_file(dctx,ectx,
+ srcfile,
+ dest ? (char *)dest->arg : *dst))
+ return SLBT_NESTED_ERROR(dctx);
+
/* PE support: does .libs/libfoo.so.def exist? */
if ((size_t)snprintf(dstfile,sizeof(dstfile),"%s.def",
slnkname) >= sizeof(dstfile))