Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.lang.c Subject: Re: Recursive #includes Keywords: recursive includes, modularity Message-ID: <965@philmds.UUCP> Date: 27 Feb 89 12:07:46 GMT References: <570@marob.MASA.COM> <9727@smoke.BRL.MIL> <573@marob.MASA.COM> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 33 In article <573@marob.MASA.COM> samperi@marob.masa.com (Dominick Samperi) writes: |In article <9727@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: |>It's easy to get the Makefile correct; just declare that a header |>depends on the others that it #includes. | |The makefile that we are currently using is structured this way, and |I suspect that this may be the reason that make (actually VMS MMS) |takes forever to get started (i.e., go through the dependencies). Another might be the fact that you're using MMS; we have a product that has to be generated both for Ultrix and VMS, and could keep the makefiles fairly system independent. MMS/CMS takes a lot of time to get started, as compared to Make/SCCS. Another point: Although the claim is that MMS is, except for some syntax additions, the same as Make, I found out it treated macros differently. |>Any such preprocessor is badly broken [i.e., one which does not permit |>recursive includes]. K&R 1st Edition imposes no |>such constraint. How about telling us what brands of compiler have |>this problem... | |I'm working with the Oasis port of AT&T's C++ translator to VMS. Their |preprocesor is named GCPP (could this be the GNU C preprocesor?). By |the way, I couldn't find any comments about recursive includes in |K&R, so I guess this means they are permitted? As Dough said, unless it's broken, yes. Of course you have to do the inclusion conditionally (or did you mean 'nested' instead of 'recursively' ?), since nesting can only occur up to an implementation-defined limit (which must be at least 8, if I may believe my - old - copy of the dpAns). Leo.