Path: utzoo!mnetor!uunet!husc6!rutgers!ames!amdcad!sun!plx!dlb!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: Makefile Maker Message-ID: <184@goofy.megatest.UUCP> Date: 24 Dec 87 21:34:09 GMT References: <9942@mimsy.UUCP> Organization: Megatest Corporation, San Jose, Ca Lines: 30 in article <9942@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) says: > > In article <176@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: >>... What you really want is something that keeps up with the >>dependencies automatically as they change. ... Let's cause the >>Makefile to update itself each time a dependency might have changed. > > We already have something like this in 4.3BSD. A number of the > makefiles in /usr/src support the command `make depend'. Admittedly > this requires manual intervention---one has to decide that it is > time to update the dependency lists---but it works and is relatively > simple. > I guess I forgot to say, "I know about 'depend', but it requires manual intervention." By the way, the "make" of my dreams would keep in its data-base not only the a record of what the source files were the last time the object was made, but also the modification dates, and the METHOD which was used to make the object. It would then remake the object if any file had been modified, or if the method to make the object had changed. For example, maybe you have added something to CFLAGS. About three years ago, I wrote just such a program for our customers. Called it "compile_files". Now it's used exclusively for Pascal programs and extensively for C programs. It is not general, however. The methods for making Pascal and C programs are "hard-coded" into it, rather than coded in the makefile. "Knows too much for its own good", you might say. So now that we have C++, it needs to be fiddled with.