Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers From: kers@hplb.hpl.hp.com (Chris Dollin) Newsgroups: comp.lang.c Subject: Re: A question on C programming style Message-ID: Date: 15 Apr 91 08:32:13 GMT References: <1991Apr12.103621.8907@umiami.ir.miami.edu> <1991Apr13.013911.18151@athena.mit.edu> Sender: news@hplb.hpl.hp.com (Usenet News Administrator) Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 28 In-Reply-To: scs@adam.mit.edu's message of 13 Apr 91 01:39:11 GMT Nntp-Posting-Host: cdollin.hpl.hp.com Steve Summit says [apropos the Nexted Include discussion]: ... Manual Makefile maintenance quickly becomes nearly impossible, so an automatic Makefile generating scheme, which follows the nested #include directives reliably, is a requirement. Why does manual makefile maintainance ``become nearly impossible'' (presuming that it wasn't already)? I handle this particular problem by having entries for each .h file, treating the includes as ``dependencies'', with a ``touch'' command as the action: thus, if foo.h includes bar.h and baz.h, I have foo.h: bar.h baz.h touch foo.h This seems to work fine (if files are spilt across separate directories, one needs a make with VPATH or some similar extension; but this isn't really any worse than the situation without nested includes). Mind you, I'd much prefer automatic maintenance; I'm just pointing out that the manual case doesn't seem *that* much harder. I'd be delighted to have the problems pointed out for me before I have to cope with them for real ... -- Regards, Kers. | "You're better off not dreaming of the things to come; Caravan: | Dreams are always ending far too soon."