Re: Makefile with .mod files from gfortran

2007-11-03 Thread Brian Dessent
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


Re: Makefile with .mod files from gfortran

2007-11-03 Thread Ignacio Fernández Galván
--- Brian Dessent [EMAIL PROTECTED] wrote:

 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.

Oh, I hadn't seen FX's answer, sorry. I will reply in the gfortran
list.

Thanks.


  ___
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 


___
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make