Make and libraries

Dave Olson olson at fortune.UUCP
Mon Jul 29 16:43:05 AEST 1985


The problem with suppressing the built-in rule that augmented make uses
in dealing with libraries becomes apparrent if there is an error in
compiling one of the files.  In this case, NONE of the files have been
added to the library, and when you fix the error, and start make,
ALL those files will once again be compiled.  This is especially
irritating when the error occurs in the 15th of 16 files!

I wrestled with this problem for quite a while, and decided that
it is best to go with the built-in rule, or some slight variation
thereon.

There are many ways to try and solve the above problem, but none of
the ones I was able to find were as RELIABLE as the built-in rule,
although most of them were somewhat faster... (as you pointed out).

The bottom line seems to be that if you are actually doing
development, you are going to be happier with the built-in rule, when
dealing with libraries.  (If you aren't doing development, but are
just writing a makefile for some existing code, you MIGHT get away
with it, but the next person to work on the code is likely to get
burned, especially if they don't thoroughly understand make!)

	Dave Olson, Fortune Systems



More information about the Comp.unix mailing list