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

Bug 200798

Summary: managed make project fails for projects with module
Product: [Tools] PTP Reporter: Mohammad Reza Hadian <m.r.hadian>
Component: Photran.Managed MakeAssignee: Timofey Yuvashev <tyuvash2>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: com-eclipse-dot-org
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mohammad Reza Hadian CLA 2007-08-22 06:42:40 EDT
the makefile created by managed make project does not work for project which has a module. simply run the following example including 3 files:
!****file vardef.f90
module VarDef
implicit none
    integer,allocatable,dimension(:)::a
    integer::n
end module VarDef

!****file setarray.f90
subroutine SetArray
    use VarDef
    implicit none
    allocate(a(n))
end subroutine SetArray

!****file main.f90
program test
    use VarDef
    implicit none
    integer :: i
    Print *, "input array dimension"
    read *,n
    call SetArray
    a=(/(2*i,i=1,n)/)
    print * ,a
end program

building of project fails with message:
make -k all 
make: *** No rule to make target `VarDef.o', needed by `main.o'.
Building file: ../vardef.f90
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o"vardef.o" "../vardef.f90"
Finished building: ../vardef.f90
 
make: Target `all' not remade because of errors.
Build complete for project managed_gfortran
Comment 1 Jeffrey Overbey CLA 2007-10-19 13:39:11 EDT
Apparently this works correctly if the capitalization of the filename (vardef.f90) exactly matches the capitalization of the module name in the USE statement (VarDef)

The bug is in org.eclipse.photran.managedbuilder.core.makegen.DefaultFortranDependencyCalculator.  This bug should be reassigned to whoever wrote that...
Comment 2 Timofey Yuvashev CLA 2009-06-17 15:19:09 EDT

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