Subject: autodep.mk
To: None <current-users@netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: current-users
Date: 03/12/2000 01:15:33
On the subject of make depend

I wrote an autodep.mk which I've been using happily for a while in my
own project.  It could make quite a difference to time to do a build.
Essentially is adds -MD to CFLAGS so that foo.d is built containing
dependencies for foo.c whenever foo.c is compiled.  A .END target
gathers all the .d files together into a .depend

So far I think this wins big time over a separate make depend pass
(which will still work btw - but instead of mkdep uses cc -M)

Have a look at ftp://ftp.quick.com.au/pub/sjg/mk/autodep.mk if interested.
There are a couple of minor hooks in prog.mk and dep.mk to make
everything happy, but autodep.mk is the main thing.  Really only
caters for C and C++ though.

--sjg