Why does “make” insert a prefix folder into the middle of a stem, but not into the beginning?
Summary The issue arises when using GNU Make’s pattern rules with directory structures. The stem ($*) in a pattern rule like deps/%.d is expanded based on the target’s basename, not its full path. This leads to unexpected directory prefixes when the target is in a subdirectory. Root Cause Pattern Rule Expansion: GNU Make’s pattern rules … Read more