summaryrefslogtreecommitdiffhomepage
path: root/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_install.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index f192053..322fd8c 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -346,30 +346,6 @@ static int slbt_exec_install_entry(
if (!fexe && dot && !strcmp(dot,".lai"))
dot[3] = 0;
- /* .la ? */
- if (!fexe && (!dot || strcmp(dot,".la"))) {
- *src = (char *)entry->arg;
- *dst = dest ? 0 : (char *)last->arg;
-
- if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
- if (slbt_output_install(dctx,ectx))
- return -1;
-
- return (((ret = slbt_spawn(ectx,true)) < 0) || ectx->exitcode)
- ? -1 : 0;
- }
-
- /* legabits? */
- if (dctx->cctx->drvflags & SLBT_DRIVER_LEGABITS)
- if (slbt_exec_install_library_wrapper(dctx,ectx,entry,dstdir))
- return -1;
-
- /* *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;
@@ -382,9 +358,10 @@ static int slbt_exec_install_entry(
} else
sprintf(srcfile,".libs/%s",lasource);
- /* executable? */
- if (fexe) {
- *src = srcfile;
+ /* executable? ordinary file? */
+ if (fexe || !dot || strcmp(dot,".la")) {
+ *src = fexe ? srcfile : (char *)entry->arg;
+ *dst = dest ? 0 : (char *)last->arg;
if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
if (slbt_output_install(dctx,ectx))
@@ -394,6 +371,17 @@ static int slbt_exec_install_entry(
? -1 : 0;
}
+ /* legabits? */
+ if (dctx->cctx->drvflags & SLBT_DRIVER_LEGABITS)
+ if (slbt_exec_install_library_wrapper(dctx,ectx,entry,dstdir))
+ return -1;
+
+ /* *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;
+
/* libfoo.a */
dot = strrchr(srcfile,'.');
strcpy(dot,dctx->cctx->settings.arsuffix);