You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to fpm, I actually use the nice Makefile and dependencies generator under An introduction to make in some projects. The Makefile has a dependencies generator which parses Fortran sources to search for dependencies, also for included files, but does not re-build when these include files are changed.
See this example project:
$> tree
.
├── gen-deps.awk
├── Makefile
└── src
├── bla.f90
├── bla-inc.f90
$> cat src/bla.f90
module bla
implicit none
private
public :: say_hello
contains
subroutine say_hello
include "bla-inc.f90"
print *, "Hello, bla!"
end subroutine say_hello
end module bla
$> cat src/bla-inc.f90
print*,'Hey!'
$> cat Makefile
(...)
# List of all source files
SRCS := src/bla.f90
TEST_SRCS :=
(...)
When I touch src/bla.f90, the project is correctly rebuilt, but not when I touch src/bla-inc.f90. Unfortunately, I'm not proficient enough with GNU make to fix this, but maybe someone can!