MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sh_make_long

Function sh_make_long

src/pipeline/pass_shell.c:1831–1845  ·  view source on GitHub ↗

A long option of make that takes a value (v: n bytes, no `=...`). */

Source from the content-addressed store, hash-verified

1829
1830/* A long option of make that takes a value (v: n bytes, no `=...`). */
1831static mk_opt_t sh_make_long(const char *v, size_t n) {
1832 static const struct {
1833 const char *name;
1834 mk_opt_t kind;
1835 } opts[] = {
1836 {"--directory", MK_OPT_DIR}, {"--file", MK_OPT_FILE}, {"--makefile", MK_OPT_FILE},
1837 {"--include-dir", MK_OPT_ARG}, {"--old-file", MK_OPT_ARG}, {"--assume-old", MK_OPT_ARG},
1838 {"--what-if", MK_OPT_ARG}, {"--new-file", MK_OPT_ARG}, {"--assume-new", MK_OPT_ARG}};
1839 for (size_t i = 0; i < sizeof(opts) / sizeof(opts[0]); i++) {
1840 if (strlen(opts[i].name) == n && strncmp(v, opts[i].name, n) == 0) {
1841 return opts[i].kind;
1842 }
1843 }
1844 return MK_OPT_NONE;
1845}
1846
1847/* A command-line variable: NAME=, NAME:=, NAME::=, NAME+=, NAME?=, NAME!=. */
1848static bool sh_make_assignment(const char *v) {

Callers 1

sh_makeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected