summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-06 13:28:32 -0500
committermidipix <writeonce@midipix.org>2016-03-08 14:21:07 -0500
commit667ce2f86fd6c3566ed8fdc38bdd66e932cba7da (patch)
treeba03526a9045a33eb882516ce8f89b9ba4fadd5c /src
parent9496779542d71928e605c09b4f3ffa801cd2a508 (diff)
downloadslibtool-667ce2f86fd6c3566ed8fdc38bdd66e932cba7da.tar.bz2
slibtool-667ce2f86fd6c3566ed8fdc38bdd66e932cba7da.tar.xz
driver: added context initialization for --mode.
Diffstat (limited to 'src')
-rw-r--r--src/driver/slbt_driver_ctx.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index dfb8581..d9136fd 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -127,6 +127,29 @@ int slbt_get_driver_ctx(
case TAG_VERSION:
cctx.drvflags |= SLBT_DRIVER_VERSION;
break;
+
+ case TAG_MODE:
+ if (!strcmp("clean",entry->arg))
+ cctx.mode = SLBT_MODE_CLEAN;
+
+ else if (!strcmp("compile",entry->arg))
+ cctx.mode = SLBT_MODE_COMPILE;
+
+ else if (!strcmp("execute",entry->arg))
+ cctx.mode = SLBT_MODE_EXECUTE;
+
+ else if (!strcmp("finish",entry->arg))
+ cctx.mode = SLBT_MODE_FINISH;
+
+ else if (!strcmp("install",entry->arg))
+ cctx.mode = SLBT_MODE_INSTALL;
+
+ else if (!strcmp("link",entry->arg))
+ cctx.mode = SLBT_MODE_LINK;
+
+ else if (!strcmp("uninstall",entry->arg))
+ cctx.mode = SLBT_MODE_UNINSTALL;
+ break;
}
} else
nunits++;