This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Makefile with .mod files


Erik Schnetter wrote:

> Finally, if you use GNU make you can also write:
> 
> a.o a.mod: a.f90
>         gfortran -c $<

This is just shorthand for writing:

a.o: a.f90
	gfortran -c $<

a.mod: a.f90
	gfortran -c $<

...which can be problematic because in the second case it violates the
concept that a rule should always update $@.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]