Files
codebase-memory-mcp/tests
Martin Vogel 3e5d298cd8 feat(pipeline): a Make rule depends on the rules its prerequisites name
A prerequisite that names a rule of the same makefile draws DEPENDS_ON
{via: prerequisite, line} from each target of the rule to that rule's
node: once per pair, at the first line stating it, as make merges the
prerequisites a target's rules give it. An order-only prerequisite (after
`|`) carries "order_only": true, unless another rule of the target lists
it as a normal one: make then treats it as normal, and the edge carries
that line.

The rule nodes exist already, one per target. The shell pass parses every
makefile it reads; it now keeps each rule's plain prerequisites and matches
them against the rule nodes of that file in one pass over the Function
nodes (the table `make <target>` resolution built, now shared).

A rule line that repeats a target or a prerequisite is read once per name:
the work is the line's words plus its distinct pairs, counted by
g_sh_make_pairs and pinned by a test at 1x, 4x and 16x. If a name cannot
be kept (an allocation fails), no prerequisite edge is drawn at all.

A prerequisite with a variable, a pattern or a glob, one that names a file
or a rule of another makefile, a target naming itself, a static pattern
rule, and a rule line the grammar could not parse cleanly (a
target-specific variable it took for a rule) draw nothing.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-27 00:00:14 +01:00
..