3 ms·
Right. Make already knows how to convert .c to .o, all you need to say is files.c: defs.h buffer.h command.h and there are tools such as makedepend (for C
by silentbicycle 17y ago
Right. Make already knows how to convert .c to .o, all you need to say is
files.c: defs.h buffer.h command.h
and there are tools such as makedepend (for C and OCaml, off the top of my head) that generate those listings automatically, so you just add this to the Makefile:
include (autogenerated dependency listing file)
While the mandatory tab in Make syntax is a genuine wart, make has been around long enough that there are several other tools that know how to work with it.
(Now, having the scan for access time changes added as a warning to Make might not be a bad idea. "WARNING: You forgot this dependency")
- garnet7 17y ago> make has been around long enough that there are several other tools that know how to work with it. I'd prefer an improved from-scratch 2nd-generation tool instead of using one that simply wraps around a complicated 1st-gen one that I'd rather not touch. Make has more warts than just the tab characters. Lots of obscurely-named variables, for starters.
- Bluem00 17y agoYou might want to check out tup. It uses the dependency tree in a fundamentally different way from make, in order to improve build times. http://gittup.org/tup/ http://gittup.org/tup/
- silentbicycle 17y ago> [complicated tool ...] Lots of obscurely-named variables, for starters. Are you talking about make or just GNU make? The $< $* $$@ stuff comes from gmake. Make itself is pretty simple. Here's a good tutorial: http://www.freebsd.org/doc/en/books/pmake/ http://www.freebsd.org/doc/en/books/pmake/