Messages in this thread |  | | From | Keith Rohrer <> | Subject | Re: Patch: cut 'make dep' time in half | Date | Fri, 6 Dec 1996 14:07:48 -0600 (CST) |
| |
> On Thu, 5 Dec 1996, Michael Elizabeth Chastain wrote: > > > I have a 'make dep' that runs in half the time of the stock 2.1.14 version. > > My patch is attached. Don't worry, it's less than 100 lines. > > ... > > One question about a couple of lines in the patch: > > > +set -e > > +dir_top=`pwd` > > +dir_list=`find $* -name '*.[chS]' -print | sed -e 's/^\(.*\)\/[^\/].*$/\1/p' | sort -u` > > +for dir in $dir_list ; do > > + cd $dir > > + $dir_top/scripts/mkdep *.[chS] > .depend > > + cd $dir_top > > +done > > Couldn't the last two lines be switched for a small speed improvement? I'm not sure. You'd have to rm .depend ahead of time and use >> rather than >, no? Plus, every make invocation would have to load all the dependencies... I'm not sure where the alleged speedup comes from.
Keith
|  |