Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!purdue!decwrl!labrea!csli!wilson From: wilson@csli.STANFORD.EDU (Nathan Wilson) Newsgroups: comp.sys.mac.programmer Subject: Make question (was MPW vs Lightspeed) Message-ID: <7260@csli.STANFORD.EDU> Date: 24 Jan 89 22:23:04 GMT References: <322@s1.sys.uea.ac.uk> <24218@apple.Apple.COM> <334@s1.sys.uea.ac.uk> Reply-To: nathan%teleos.com@ai.sri.com Organization: Center for the Study of Language and Information, Stanford U. Lines: 26 This is a rather naive question but here goes. What is the *real* goal of make files. Long ago in the dim recesses of my memory when I was first learning to program in something other than basic, someone introduced me to make files. My understanding was that you create a file that lists which files use things defined in other files. The make command then uses this file and the last modified dates to make a list of commands to recompile all the files that have changed and all the files that haven't changed but which depend on files that have changed. Now my question is why does one ever have to recompile a file that hasn't changed? Is it just to check that the functions defined in the changed file need the same parameters and return the same results, and that data structures and globals variables haven't changed or is it more profound? If not then if the only changes I make are to the body of an existing function or procedure, or adding new functions/data types, can I just just recompile the files that have changed and then relink? I've tried this and it seems to work, but I'm still a bit leery of hidden gotchas. The savings in turn around time on large applications seems quite significant. A second question: Is it ever necessary to compile a file that only depends on files that haven't changed? That is A depends on B. B depends on C. I change C. A does not depend on C. Do I need to recompile A? Thanks in advance, Nathan Wilson Teleos Research nathan%teleos.com@ai.sri.com