Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] buggy subdir.mk and top-level makefile

Hi all

After some time not using Fortran (and thus Photran) I tried the new 4.0 Beta 3 release and found what others also have found (see e.g. [1] and [2]), although nobody mentions what the real problem is, so I still report it:

1) If one uses source files with modules different from the file USE- ing them, Photran correctly detects the dependency but fails to create a correct dependency if that source file with the module is in a sub- directory. Here is a fragment from src/subdir.mk which Photran created:

src/hello.o: ../src/hello.f90 testmod.o

src/testmod.o: ../src/testmod.f90


It is clear that in the first line "testmod.o" should be prefixed with "src/", otherwise make won't know how to create testmod.o. Funny thing is, Photran does the right thing in the second line...


2) If one does a "make clean", Photran leaves all the .mod files behind. That is not such a bad thing, as they will be overwritten anyways by the Fortran compiler the next time make is run. What is bad, is that make has an built-in rule for Modula source files which use the ending .mod and tries to use the Modula2 compiler m2c to create the .o file. This behavior can be fixed by canceling the built- in rule using e.g.:

%.o: %.mod

This would be OK, as long as nobody relies on that rule to actually compile Modula sources.

Regards

Michael


[1] http://dev.eclipse.org/mhonarc/lists/photran/msg00658.html
[2] http://dev.eclipse.org/mhonarc/lists/photran/msg00558.html



Back to the top