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

some comments on making 828




Hi,

I just grabbed the 828 tarball that John put in fefflib.  There are
some problems with the Makefiles.

1.  The F77 macro should be defined in the top-most Makefile and
    passed to each of the Makefiles in the daughter directories.  That
    way, if you want to compile on a diffferent system or play around
    with compiler options, you only need to edit them in one place.
    Of course, you can defined F77 from the command line, but it
    should still be done from the top-most Makefile.

2.  "make clean" does not clean out the LIB directory.

3.  The makefiles in the various subdirectories define the .f.o rule
    in an inconsistent manner that makes it very hard to compile the
    package.  The problem is that some subdir makefiles define the
    .f.o rule like this (correct!):
        $(F77) -c $*.f
    and some of them have this (incorrect!):
        $(F77) $*.f

    This problem manifested itself very early in the compile.  If I do
    (I am leaving off warning and optimization flags for clarity):

        make F77=g77

    it will die immediately in the PAR directory (the first on the
    list).  This is because the -c flag is required to tell g77 to
    compile only and not link.

    OK.  So if I do:

       make F77='g77 -c'

    This chugs along fine for a while until it is done compiling in
    the LDOS directory and it goes to link the object.  Then it
    complains about the -c flag and quits.

    To get everything to compile, I had to make use of make's -k flag
    and to issue the make command twice.  That is certainly not what
    is intended. 

    The quickest 'n' dirtiest solution is to fix the .f.o rules to
    always have the -c switch.  The better solution is to do that AND
    to define the F77 macro in the top-most Makefile.

Anyway, in the end 828 compiled.  I'll post to this channel if I run
into any non-compilation related problems.

B

-- 
 Bruce Ravel  ----------------------------------- ravel@phys.washington.edu
 U.S. Naval Research Laboratory, Code 6134          phone: (1) 202 767 5947
 Washington DC 20375, USA                             fax: (1) 202 767 1697

 NRL Synchrotron Radiation Consortium (NRL-SRC)
 Beamlines X11a, X11b, X23b, X24c, U4b
 National Synchrotron Light Source
 Brookhaven National Laboratory, Upton, NY 11973

 My homepage:    http://feff.phys.washington.edu/~ravel 
 EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/