[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Speeding up ATLAS build time



Carl,

>Here is an updated patch file.  I think this
>should work (it seems to work right for me
>at any rate).

From inspection, it appears to me that dependency information has been lost.
Here is an example:

old:
dlib.grd : $(dobj)
        $(ARCHIVER) $(ARFLAGS) $(LAPACKlib) $(dobj)
        $(RANLIB) $(LAPACKlib)
        touch dlib.grd

new:
dlib.grd :
       $(PMAKE) $(dobj)
        $(ARCHIVER) $(ARFLAGS) $(LAPACKlib) $(dobj)
        $(RANLIB) $(LAPACKlib)
        touch dlib.grd

In the old, let us say I build dlib.grd.  I now touch a bob.c file, and do 
"make dlib.grd" again.  Make sees that dlib.grd depends on $(dobj), which
contains bob.o, which depends on bob.c, and recompiles and rearchives.

In the new system, dlib.grd depends on nothing, and so nothing is rebuilt
as long as dlib.grd exists.  We can get rid of the "touch dlib.grd", but
then it will be rearchived all the time (a monumental waste of time).

I think there is probably a solution, but I don't think we have found it yet.
I think it can be constructive to play with a toy example, and not try to
do the whole lib until the example works.  Take this example makefile, 
based on the above:
===============================================================================
dudley.home.net. cat Makefile 
tst.o : tst.c
        gcc -c tst.c
xtst :
        make tst.o
        gcc -o xtst tst.o
dudley.home.net. make xtst
make tst.o
make[1]: Entering directory `/home/rwhaley/TEST'
gcc -c tst.c
make[1]: Leaving directory `/home/rwhaley/TEST'
gcc -o xtst tst.o
dudley.home.net. touch tst.c
dudley.home.net. !mak
make xtst
make: `xtst' is up to date.
===============================================================================

Cheers,
Clint