4 ms·
Wait... "%.o: %.c" is nonstandard?!?
by majewsky 9y ago
Wait... "%.o: %.c" is nonstandard?!?
- pavlov 9y agoYes, base Make is almost useless for anything larger than a utility.
- zbuf 9y agoNot quite; I think '.c.o' is the equivalent in the original Make syntax?
- majewsky 9y agoThat's nowhere near equivalent. For example, it cannot replace the following things: pkg/test/migrations/%.sql: pkg/db/migrations/%.sql build/%.cover.out: prepare-check FORCE (In the second one, $* is then used in the build rule, which is why % does not need to show up in the prerequisites list.) Examples from https://github.com/sapcc/limes/blob/62e07b430e2019a6c189144350bae34c574b2f55/Makefile https://github.com/sapcc/limes/blob/62e07b430e2019a6c1891443...
- tannhaeuser 9y agoAccording to the POSIX make manpage [1], the following double-suffix rule is part of the defaults: .c.o: $(CC) $(CFLAGS) -c $< [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ma...