On Sat, 14 Jan 2006, Gerhard Fiedler wrote: > What I don't like with make is the dependency tracking. Say you have > fileA.h that includes fileB.h. fileA.c includes fileA.h, and therefore is > dependent on both fileA.h and fileB.h. But if you tell make only the > existing dependencies, you'd have to create a special rule that bumps the > timestamp of fileA.h if fileB.h is newer, so that fileA.c gets rebuilt if > fileB.h changes. But that then doesn't go well with a versioning system, > because fileA.h didn't actually change. > > The only workaround I've found so far is to "manually" do the dependency > tracking in the make file, through variables that contain the dependency > lists. Which is a pain. "makedepend" will generate a dependency list and insert it into your makefile, and it handles cases like you mention above (without modifying timestamps). This requires you to manually run makedepend when you change your dependencies, but it doesn't require you to manage the dependencies yourself. With some clever scripting, you can have makedepend run when you do a "make" and keep all the dependencies updated automatically. -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist