Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 200798 - managed make project fails for projects with module
Summary: managed make project fails for projects with module
Status: RESOLVED DUPLICATE of bug 222484
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Managed Make (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Timofey Yuvashev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 06:42 EDT by Mohammad Reza Hadian CLA
Modified: 2009-06-17 15:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***