Ignacio Fernández Galván wrote:
a.mod a.o: a.f90 b.mod
gfortran -c $
b.mod b.o: b.f90
gfortran -c $
The reason that this misbehaves is that it violates rule number 2:
http://make.paulandlesley.org/rules.html. Specifically, what you are
telling make with the above is: to update a.mod, run gfortran -c
a.f90. But that command does not necessarily update a.mod, so it's a
lie, and make gets confused.
Did you not see FX's reply on the fortran list?
http://gcc.gnu.org/ml/fortran/2007-11/msg00013.html His solution is
cleaner, since it effectively communicates to make that a.mod depends on
a.f90 and a.o, but without implying that the module can be rebuilt by
calling gfortran -c a.f90. I think the @true part is even extraneous if
it looks too ugly.
Brian
___
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make