3 ms·
The author should mention the automatic variables: https://web.mit.edu/gnu/doc/html/make_10.html#SEC94 https://web.mit.edu/gnu/doc/html/make_10.html#SEC94 Spec
by yegle 3y ago
The author should mention the automatic variables: https://web.mit.edu/gnu/doc/html/make_10.html#SEC94 https://web.mit.edu/gnu/doc/html/make_10.html#SEC94
Specifically, in one of the examples, to list all dependencies as the input to `cc`, you can write `$^` instead of `$(OBJS)`.
- djbusby 3y agoOBJS is a little more clear to what's happening than $^ I'm not a fan of magic symbols. Hard to remember, especially across languages.
- slau 3y agoMake actually has some of the more sensible shortcuts, which are easy to remember $@ -> the target (like an email address) $^ -> the dependencies (look up) $< -> only the first dependency (look up sign, but rotated 90s left to point at the first one)