Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!encore!maxzilla!corbin From: corbin@maxzilla.Encore.COM Newsgroups: comp.unix.questions Subject: Make dependencies and nested include files Summary: How do you do it Message-ID: <10115@encore.Encore.COM> Date: 12 Oct 89 04:33:15 GMT Sender: news@Encore.COM Reply-To: corbin@maxzilla.UUCP () Organization: Encore Computer Corp, Marlboro, MA Lines: 31 Does anyone have an idea of how to handle nexted include file dependencies in make? Given that test includes test.h, test.h include test1.h and test1.h include test2.h. When test2.h is touched test.c will not get rebuilt given the follow make dependencies: test.c: test.h test.h: test1.h test1.h: test2.h Can this be done in make or is test.c: test.h test1.h test2.h the only way it will work. The problem with the second example is that I'm working on a product with hundreds of files and maintaining dependencies manuallly is tedious and error prone. I would like to do automatic dependency generation. I have a grep/sed/awk script that will generate the first example by scanning all the sources (.s .c .h). I'm just learning sed/awk and it would probably take me weeks to figure out how to generate the second case. Does anyone have such a tool/script that would take a list of files and generate dependencies or any ideas on how to solve the problem? Stephen Corbin {bu-cs,decvax,necntc,talcott}!encore!corbin corbin@encore.COM Stephen Corbin {bu-cs,decvax,necntc,talcott}!encore!corbin corbin@encore.COM