summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_split_argv.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-13 05:22:07 +0000
committermidipix <writeonce@midipix.org>2024-02-13 05:22:07 +0000
commitc1f21665c7010c70b87f79e1b81dc7f2564f26c9 (patch)
tree3b09adc125a5df414af01281d32b23208c934272 /src/driver/slbt_split_argv.c
parent97bc5cffc0f90991211524321e423a3b0b5e5ea2 (diff)
downloadslibtool-c1f21665c7010c70b87f79e1b81dc7f2564f26c9.tar.bz2
slibtool-c1f21665c7010c70b87f79e1b81dc7f2564f26c9.tar.xz
utility: newly added --config, now producing compatible --config output.
Diffstat (limited to 'src/driver/slbt_split_argv.c')
-rw-r--r--src/driver/slbt_split_argv.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/driver/slbt_split_argv.c b/src/driver/slbt_split_argv.c
index 04800d8..601c1ad 100644
--- a/src/driver/slbt_split_argv.c
+++ b/src/driver/slbt_split_argv.c
@@ -52,6 +52,7 @@ int slbt_split_argv(
struct argv_entry * help;
struct argv_entry * version;
struct argv_entry * info;
+ struct argv_entry * config;
struct argv_entry * finish;
struct argv_entry * features;
struct argv_entry * ccwrap;
@@ -117,8 +118,8 @@ int slbt_split_argv(
return -1;
}
- /* missing all of --mode, --help, --version, --info, --dumpmachine, --features, and --finish? */
- mode = help = version = info = finish = features = ccwrap = dumpmachine = aropt = 0;
+ /* missing all of --mode, --help, --version, --info, --config, --dumpmachine, --features, and --finish? */
+ mode = help = version = info = config = finish = features = ccwrap = dumpmachine = aropt = 0;
for (entry=meta->entries; entry->fopt; entry++)
if (entry->tag == TAG_MODE)
@@ -129,6 +130,8 @@ int slbt_split_argv(
version = entry;
else if (entry->tag == TAG_INFO)
info = entry;
+ else if (entry->tag == TAG_CONFIG)
+ config = entry;
else if (entry->tag == TAG_FINISH)
finish = entry;
else if (entry->tag == TAG_FEATURES)
@@ -155,7 +158,7 @@ int slbt_split_argv(
return -1;
}
- if (!mode && !help && !version && !info && !finish && !features && !dumpmachine && !altmode) {
+ if (!mode && !help && !version && !info && !config && !finish && !features && !dumpmachine && !altmode) {
slbt_dprintf(fderr,
"%s: error: --mode must be specified.\n",
program);
@@ -163,7 +166,7 @@ int slbt_split_argv(
}
/* missing compiler? */
- if (!ctx.unitidx && !help && !info && !version && !finish && !features && !dumpmachine && !altmode && !aropt) {
+ if (!ctx.unitidx && !help && !info && !config && !version && !finish && !features && !dumpmachine && !altmode && !aropt) {
if (flags & SLBT_DRIVER_VERBOSITY_ERRORS)
slbt_dprintf(fderr,
"%s: error: <compiler> is missing.\n",
@@ -323,7 +326,7 @@ int slbt_split_argv(
if (ctx.unitidx) {
(void)0;
- } else if (help || version || features || info || dumpmachine || altmode) {
+ } else if (help || version || features || info || config || dumpmachine || altmode) {
for (i=0; i<argc; i++)
sargv->targv[i] = argv[i];