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

Function push_make_include

internal/cbm/extract_imports.c:2724–2733  ·  view source on GitHub ↗

--- Make imports: include / -include / sinclude FILE... --- Every name of an include directive -- outside recipes, conditionals included -- imports that file; its local name is the file's base name. A name holding a variable reference is known only to make and stays out. (The generic text fallback kept the directive's trailing newlines in the path and split it at the extension's dot.)

Source from the content-addressed store, hash-verified

2722// (The generic text fallback kept the directive's trailing newlines in the
2723// path and split it at the extension's dot.)
2724static void push_make_include(CBMExtractCtx *ctx, TSNode word) {
2725 CBMArena *a = ctx->arena;
2726 char *path = cbm_node_text(a, word, ctx->source);
2727 if (!path || !path[0] || strchr(path, '$')) {
2728 return;
2729 }
2730 const char *slash = strrchr(path, '/');
2731 CBMImport imp = {.local_name = slash ? slash + SKIP_ONE : path, .module_path = path};
2732 cbm_imports_push(&ctx->result->imports, a, imp);
2733}
2734
2735static void parse_make_imports(CBMExtractCtx *ctx) {
2736 TSNodeStack stack;

Callers 1

parse_make_importsFunction · 0.85

Calls 2

cbm_node_textFunction · 0.85
cbm_imports_pushFunction · 0.85

Tested by

no test coverage detected