Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!rutgers!ucla-cs!heather From: heather@burnett.SEAS.UCLA.EDU Newsgroups: comp.software-eng Subject: Re: Recursive #includes Keywords: recursive includes, modularity Message-ID: <21037@shemp.CS.UCLA.EDU> Date: 27 Feb 89 16:46:42 GMT References: <570@marob.MASA.COM> Sender: news@CS.UCLA.EDU Reply-To: heather@burnett.SEAS.UCLA.EDU (Heather Burris) Organization: UCLA School Of Engineering & Applied Science Lines: 22 In article <570@marob.MASA.COM> samperi@marob.MASA.COM (Dominick Samperi) writes: >Are recursive #includes hazardous to your software's health? > > etc... > >definitions may be needed, what the heck). Furthermore, permitting >recursive includes may tend to smear the separation between modular >components of the software system, and designing a correct makefile >will be a mess. > For those that have BSD 4.3 based C compilers, I would like to point out that a recent addition to the C preprocessor enables the preprocessor to generate a dependancy list that can be included in a Makefile. Since the C preprocessor had to parse #include directives anyway (and it does this recursively), adding an option (-M) to simply parse #includes and spit them out wasn't difficult. For those of you unlucky enough not to have this tool, here's something to look forward to (and it's actually pretty easy to write something that will do this for you in the meantime). Heather Burris, UCLA