aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-12 19:28:12 +0100
committerlemon <lsof@mailbox.org>2025-11-12 19:28:15 +0100
commit891edf7ba1582d1f6254c59a246db577f14b864a (patch)
tree3da1cdd5e9c092741b1978c9e51f4e4fa1b72e0e
parent1547c07639be7bd83cbc9a21a2036bc96b6fa05d (diff)
driver: placeholder cmdline option handlers
-rw-r--r--main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/main.c b/main.c
index eec8722..a78ec9b 100644
--- a/main.c
+++ b/main.c
@@ -160,11 +160,22 @@ optparse(char **args)
task.outft = OFTobj;
} else if (!strcmp(arg, "E")) {
task.outft = OFTc;
+ } else if (*arg == 'g') {
+ /* TODO debug info */
} else if (*arg == 'I') {
const char *p = arg[1] ? arg+1 : *++args;
if (!p) fatal(NULL, "missing path after `-I`");
else addinclpath(p);
- } else Bad: warn(NULL, "invalid option: %'s", arg-1);
+ } else if (*arg == 'M') {
+ ++arg;
+ if (*arg == 'F' || *arg == 'T' || *arg == 'Q') {
+ const char *p = arg[1] ? arg+1 : *++args;
+ if (!p) fatal(NULL, "missing path after `-M%c`", *arg);
+ }
+ /* TODO depfiles */
+ } else if (*arg == 'W') {
+ /* TODO warning switches */
+ } else Bad: warn(NULL, "unrecognized option: %'s", arg-1);
}
if (!task.ninf) fatal(NULL, "no input files");