summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_amain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/slbt_amain.c')
-rw-r--r--src/driver/slbt_amain.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/driver/slbt_amain.c b/src/driver/slbt_amain.c
index 3b21500..73d1462 100644
--- a/src/driver/slbt_amain.c
+++ b/src/driver/slbt_amain.c
@@ -85,6 +85,9 @@ static void slbt_perform_driver_actions(struct slbt_driver_ctx * dctx)
if (dctx->cctx->mode == SLBT_MODE_AR)
slbt_exec_ar(dctx);
+
+ if (dctx->cctx->mode == SLBT_MODE_STOOLIE)
+ slbt_exec_stoolie(dctx);
}
static int slbt_exit(struct slbt_driver_ctx * dctx, int ret)
@@ -132,6 +135,13 @@ int slbt_main(char ** argv, char ** envp, const struct slbt_fd_ctx * fdctx)
else if (!(strcmp(dash,"ar")))
flags |= SLBT_DRIVER_MODE_AR;
+ /* slibtoolize (stoolie) mode */
+ if (!(strcmp(program,"stoolie")))
+ flags |= SLBT_DRIVER_MODE_STOOLIE;
+
+ else if (!(strcmp(program,"slibtoolize")))
+ flags |= SLBT_DRIVER_MODE_STOOLIE;
+
/* debug */
if (!(strcmp(program,"dlibtool")))
flags |= SLBT_DRIVER_DEBUG;
@@ -182,9 +192,10 @@ int slbt_main(char ** argv, char ** envp, const struct slbt_fd_ctx * fdctx)
/* --version must be the first (and only) action */
if (dctx->cctx->drvflags & SLBT_DRIVER_VERSION)
if (dctx->cctx->mode != SLBT_MODE_AR)
- return (slbt_version(dctx,fdout) < 0)
- ? slbt_exit(dctx,SLBT_ERROR)
- : slbt_exit(dctx,SLBT_OK);
+ if (dctx->cctx->mode != SLBT_MODE_STOOLIE)
+ return (slbt_version(dctx,fdout) < 0)
+ ? slbt_exit(dctx,SLBT_ERROR)
+ : slbt_exit(dctx,SLBT_OK);
/* perform all other actions */
slbt_perform_driver_actions(dctx);