Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 236414

Summary: Managed make problems - subdir, mod files
Product: [Tools] PTP Reporter: Jeffrey Overbey <com-eclipse-dot-org>
Component: Photran.Managed MakeAssignee: Timofey Yuvashev <tyuvash2>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P2    
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Jeffrey Overbey CLA 2008-06-10 08:14:39 EDT
From mailing list (6/3/08):

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
Comment 1 Timofey Yuvashev CLA 2009-05-29 18:00:16 EDT
Michael,
Could you please provide an example when the behaviour that you talk about in number 2 is observed? That would be very helpful!
Thanks!
Comment 2 Timofey Yuvashev CLA 2009-07-27 17:21:57 EDT

*** This bug has been marked as a duplicate of bug 222484 ***