Dear Photran users and developpers,
I dig up this old (2007) message that I sent to the list, because it
seems this Pb came back with photran 6.0 because of the new way to
discover modules.
Le 30/11/2007 16:00, Michel DEVEL a écrit :
Hello
everybody,
I currently try to use Photran on a Linux cluster with the intel or
gfortran compilers.
After a first pass of compilation by ifort (and creation of .mod files
with modules inside signaled by a green disk and a white M inside in
the Fortran project pane) the make stops with the following problem
concerning a kinds.mod file created from one of my source files:
m2c -o kinds.o kinds.mod
make: m2c: Command not found
make: *** [kinds.o] Error 127
make: Target `all' not remade because of errors.
Browsing internet I discovered that m2c is supposed to translate
Modula2 files in C.
=> what shall I do to prevent photran/cdt from trying to compile
these .mod files ?
I may have discovered the cure to this problem in the R mail archive
(message from Pr. Jason Liao)
"
Gfortran creates a file namemod= for each module name. This confuses the gnu make, which thinks that .mod
files are Modula2 source code files. You must override this built-in
rule by adding the following line somewhere in your Makefile.
%.o : %.mod
"
Indeed this single line "%.o : %.mod" seems to cure the Pb when placed at the right place in a "manual" makefile
Could it be included in Photran automatically generated makefiles ?
--
Sincerely yours,
Michel DEVEL
|