diff options
| author | 2025-11-12 19:28:12 +0100 | |
|---|---|---|
| committer | 2025-11-12 19:28:15 +0100 | |
| commit | 891edf7ba1582d1f6254c59a246db577f14b864a (patch) | |
| tree | 3da1cdd5e9c092741b1978c9e51f4e4fa1b72e0e /main.c | |
| parent | 1547c07639be7bd83cbc9a21a2036bc96b6fa05d (diff) | |
driver: placeholder cmdline option handlers
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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"); |