diff options
author | midipix <writeonce@midipix.org> | 2016-03-18 19:09:56 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-18 19:49:09 -0400 |
commit | 9804917e9810873736ef22a25d841b05dee2830a (patch) | |
tree | 09ae38e017045e219ec869fd392bd75753f69bc7 /src/slibtool.c | |
parent | 37ff4abbe80b0fac3cfd543629a7c29e58b97d61 (diff) | |
download | slibtool-9804917e9810873736ef22a25d841b05dee2830a.tar.bz2 slibtool-9804917e9810873736ef22a25d841b05dee2830a.tar.xz |
utility: slibtool_perform_driver_actions(): initial implementation.
Diffstat (limited to 'src/slibtool.c')
-rw-r--r-- | src/slibtool.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/slibtool.c b/src/slibtool.c index 6fb3422..dfc57e2 100644 --- a/src/slibtool.c +++ b/src/slibtool.c @@ -22,6 +22,15 @@ static ssize_t slibtool_version(struct slbt_driver_ctx * dctx) return fprintf(stdout,vermsg,dctx->program,SLIBTOOL_GIT_VERSION); } +static void slibtool_perform_driver_actions(struct slbt_driver_ctx * dctx) +{ + if (dctx->cctx->drvflags & SLBT_DRIVER_CONFIG) + dctx->nerrors += (slbt_output_config(dctx) < 0); + + if (dctx->cctx->mode == SLBT_MODE_COMPILE) + dctx->nerrors += (slbt_exec_compile(dctx,0) < 0); +} + static void slibtool_perform_unit_actions(struct slbt_unit_ctx * uctx) { } @@ -46,6 +55,9 @@ int slibtool_main(int argc, char ** argv, char ** envp) if ((slibtool_version(dctx)) < 0) return slibtool_exit(dctx,2); + slibtool_perform_driver_actions(dctx); + ret += dctx->nerrors; + for (unit=dctx->units; *unit; unit++) { if (!(slbt_get_unit_ctx(dctx,*unit,&uctx))) { slibtool_perform_unit_actions(uctx); |