make depend

Guy Harris guy at rlgvax.UUCP
Sun Mar 3 05:14:46 AEST 1985


> So, anyone know if this -M flag has been added at BRL or why Guy missed
> out on it?

I got some mail from Thomas Breuel at Harvard saying

	Old 4.2 distribution tapes don't have it, and I'm not sure whether
	it's officially out...

so I guess we missed out on it by getting too early a 4.2 tape.  (Somebody
told me once that there was only going to be one 4.2BSD tape, so people
wouldn't have to worry about "well, gee, I have an old tape"; I guess that
changed.)  I checked a local 4.3 (more-or-less) system and it has the
flag.  I guess it's coming in 4.3.

It's a very small change.  They redirect the output of "cpp" to "/dev/null"
(literally), and the only output that goes to the normal place is the
equivalent of "# <linenum> <file>" lines, except that only one gets produced
per included file, and the syntax is that of a make dependency line.
The same goal can be achieved with a filter; such a filter was posted to
"net.sources" ages ago.

Either the filter, or the -M flag, should be picked up and stuck into every
UNIX in existence (picked up by vendors, for the benefit of their licensees),
because the absence of (semi-)automated dependency generators is a nuisance.
People don't keep their dependency lists up to date, things don't get remade
when a header changes, and all sorts of bugs crop up.  Or, worse, they only
appear when ".o" files are removed and the modules are recompiled, so the bug
appears rather distant in time from the actual change to the header file.
-- 
	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.lang.c mailing list