diff options
author | midipix <writeonce@midipix.org> | 2024-03-17 16:02:00 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-17 16:02:00 +0000 |
commit | 4c3fb76f0341f4ac98f23a434fc741e1252d9627 (patch) | |
tree | 9c2bb699dc3866e3f2a397ab631431c272ab6673 /src/driver/slbt_amain.c | |
parent | 752cd9fff4d112e534cd137b30ddefb87b651b30 (diff) | |
download | slibtool-4c3fb76f0341f4ac98f23a434fc741e1252d9627.tar.bz2 slibtool-4c3fb76f0341f4ac98f23a434fc741e1252d9627.tar.xz |
slibtoolize mode: program skeleton, driver integration, and symlink extra.
Diffstat (limited to 'src/driver/slbt_amain.c')
-rw-r--r-- | src/driver/slbt_amain.c | 17 |
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); |