jal@oliveb.UUCP (Richard Rockmore) (05/30/86)
I have a variation to the problem posted before which is not handled by the solution I presented. This situation has also come up often for us. As we build the library, we run test programs to check what we have ported so far. As such, the makefile for the test programs wants to check that the library contains the neccesary modules being tested and ONLY check for those modules. Usually modules are missing becaus we have not reached testing them or routines that they depend on have not been tested yet. A sample line demonstrates: t1 : t1.o cd (library directory); make (list of tested modules) cc <test program> <library> There are many such lines for the various test programs. The problem is how to get make to check the library contains update versions of the code of just the modules required and not check for anything else. Also, if we have changed modules which have different test programs then making the first test program will make the library appear up-to-date with respect to all the modules so that making the second test program requires being able to check the date of the modules inside the library. Hence the need for something like: library(module.o) : module.c Remember also, we do not keep the '.o's, (mainly space reasons) so we have only the sources and the library. We can't have the library depend on all the source since then make would attempt to compile the lot of them. Here is a sample of the kludge solution we have: a : a.c cc -c a.c ar r lib.a a.o rm a.o echo -n > a and in the test program makefile we have: t1 : t1.c cd (library directory); make a . . Any thoughts ? Thanx. Jayen.