Le 06/06/2011 18:24, Anusha Sekar a écrit :
I use my own makefile and I had similar problems when
the order of .o files in the makefile was not right (the missing
file error). Just wondering if perhaps when you added the new
module, the order in which it was written into the makefile was
incorrect? So it could not find xxxx.o required to build yyyy.o?
Hi,
Looking at the subdir.mk files, it is true that since my module has
a name that puts the corresponding file at the end of the file list
(alphabetical order), there may be dependencies problems (this is
why I often try to put one or more 0 in front of the file name to
force the order of compilations for the first pass (or uncheck the
"stop at first error" box). The problem is that since photran
expects the name of the file to be the name of the module (+ .f*), I
have to rename them back afterward.
(I had less problems before photran version 5 (or 6?) when I could
put all my little modules in a single file with a name such as
00modules.f)
It seems to me there should be (are ?) several pass of dependencies
calculator before writing the various *mk files.
I have subroutines that "use" modules that "use" modules that "use"
modules!....
Looking at the "subdir.mk" files, it seems to me that this is taken
into account by dependency lines such as
src/const_fond.o: ../src/const_fond.f90 src/kinds.o
src/divide_target.o: ../src/divide_target.f90 src/debug_param.o
src/init_params.o src/io_units.o src/kinds.o
even if kinds.o is the most elemental one called by all the others
but then, I wonder where my problems come from.
Could it come from the fact that *.mod files are never referenced in
those subdir.mk files?
--
Sincerely yours,
Michel DEVEL
|