This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47495] .mod files: File modification time - Makefile build issue
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 16:11:31 +0000
- Subject: [Bug fortran/47495] .mod files: File modification time - Makefile build issue
- Auto-submitted: auto-generated
- References: <bug-47495-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47495
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-27 16:11:18 UTC ---
For the example, the following works - though it it not robust: The order of
the "myprogram" dependencies matters - and for the same reason doing a "make
myprogram.o" will fail. (Assuming that mymodule.f90 has a change, which is
required by myprogram.)
myprogram: mymodule.o myprogram.o
gfortran -o myprogram myprogram.o mymodule.o
mymodule.mod:
gfortran -c mymodule.f90
mymodule.o: mymodule.f90
gfortran -c mymodule.f90
myprogram.o: myprogram.f90 mymodule.mod
gfortran -c myprogram.f90