incremental ports/INDEX builder

Oliver Eikemeier eikemeier at fillmore-labs.com
Tue Jun 22 03:57:54 PDT 2004


Kris Kennaway wrote:

> On Tue, Jun 22, 2004 at 10:32:14AM +0200, Radim Kolar wrote:
> 
>>my program for speedups of make index rebuilding after cvsup
>>
>>http://home.tiscali.cz/~cz210552/bsdportsutils.html
> 
> This is interesting, but based on my attempt to read the code (it's
> not commented, and I don't speak ruby) I don't think you catch all the
> cases.  For example, when something like bsd.kde.mk or
> ../../someother/port/Makefile.inc changes, it can also affect ports
> that .include those files, and cause a change to 'make index'.  This
> doesn't happen often, but it happens sometimes, and an incremental
> index generator needs to handle it.  There are some other corner
> cases, but I can't tell whether your code handles them.
> 
> I have a make-based prototype that maintains and updates this
> dependency information too, but it currently also has a bug (missing
> newline on one of the 'make describe' outputs).  I'm hoping to work on
> that again this week so I can post the implementation for comments.

I have a perl script that does this at
  <http://people.freebsd.org/~eik/scripts/depends/>

The advantage is that it is independent of changes in /etc/make.conf
or /usr/local/etc/pkgtools.conf, OPTIONS or OSVERSION which might
be important. OTOH potentially all packages can change when something
in MK/bsd.*.mk is changed, so in these caese a complete rebuild is
necessary.

I have this into testing for two weeks now, and the heuristics are
pretty reliable. I tried an approach with patching make(1) too, but
you won't gain much (there are not many additional files involved),
and it is too sensitive to changes outside the ports system, makeing
the generated dependency file non-portable.

OTOH you handlke border cases better, like setting MASTERDIR twice.

I'm pretty happy with my approach, and it is quite fast.
-Oliver


More information about the freebsd-ports mailing list