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

Bug 361880

Summary: Managed make dependency tree not created in subdir.mk
Product: [Tools] PTP Reporter: RLemos <rtl_trash>
Component: Photran.Managed MakeAssignee: Photran Inbox <photran-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: com-eclipse-dot-org
Version: 7.0   
Target Milestone: 7.0.5   
Hardware: PC   
OS: Linux   
Whiteboard:

Description RLemos CLA 2011-10-25 00:13:39 EDT
Build Identifier: 20110916-0149

Unlike Photran6 (in Helios), which creates a dependency tree in subdir.mk, Photran7 does not, meaning that the compiler runs through the files alphabetically (I confirmed this). So, if for example main.f03 depends on mod1.f03, the compiles cannot find mod1.mod and aborts. I looked everywhere for a missing a check box (indexer, autotools, build, etc.) but could not find it. As a workaround, I've been using the Makefile Project -> GCC Fortran, where I create my own makefile, but I was hoping you could fix this. Thanks in advance!

Reproducible: Always

Steps to Reproduce:
1. Create a new Fortran Project -> Executable (Gnu Fortran on Linux/*nix) -> GCC Fortran
2. Place two files in it: main.f03 and mod1.f03; Here's some sample code:
main.f03:
program main
    use mod1
    call mod1sub1
end program

mod1.f03:
module mod1
    implicit none
    public :: mod1sub1
    contains
    subroutine mod1sub1
    end subroutine mod1sub1
end module mod1

3. Build All. You should get the following error:

make all 
Building file: ../main.f03
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -o "main.o" "../main.f03"
../main.f03:2.12:

    use mod1
            1
Fatal Error: Can't open module file 'mod1.mod' for reading at (1): No such file or directory
make: *** [main.o] Error 1

**** Build Finished ****
Comment 1 Jeffrey Overbey CLA 2012-01-04 16:17:52 EST
Hi, thanks for the bug report.  This should be fixed in 7.0.5 (due to the fix for Bug 365652), which will be released later this month.

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