Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!mit-eddie!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.programmer Subject: Re: Makefiles -- .c and .h Message-ID: <1990Nov18.204155.6925@athena.mit.edu> Date: 18 Nov 90 20:41:55 GMT References: <9011151442.AA02010@decpa.pa.dec.com> <1990Nov15.172323.23431@athena.mit.edu> <6268@minyos.xx.rmit.oz.au> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 31 In article <6268@minyos.xx.rmit.oz.au>, s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) writes: |> This might be the current "standard method" of getting around this |> problem.. but wouldn't it be "Better" to "modify" |> make / pmake to accept lines similar to.. |> .o : .c header.h |> or maybe some form of wildcard system? That's just fine if every one of your source files includes the same header files, but in a large software project, that is almost definitely not the case. Recompiling is a slow process; I want it to take place *only* when necessary, which means that I only want dependencies for each .o file to exist for the actual include files upon which that .o file depends, not for every include file in the software project. Another reason automatically generated dependencies are a good thing is that they do recursive dependency generation. That means that if I include , and that file includes , then both of those include files will be added as dependencies. Some people see this as a bad thing; they say, "Why should I have to recompile everything if my administrator changes ?" My answer is that if any standard system include file was changed, there's a *reason* for it, and you should be recompiling if for no other reason than to verify that your source code still works with the changed header files. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710