TCBuild Helps Fortran 90 Coders with Dependent Builds

When working on large projects with many files in Fortran 90, the code dependencies can become a problem, and there arenit many tools to help with that. Drew McCormack was at last summeris WWDC conference and decided to do something about it. The result is TCBuild, written in Python.

The research note at described the development of a "Python script to determine the dependencies in a multi-file, multi-directory Fortran program. Over time, this has developed into a reasonably complete build system that I now use for my daily Fortran development, from small utility programs with tens of files, to a million line monster," Dr. McCormack wrote.

In the introduction, the author explained how there are lots of tools that support C development, but Fortran, still used by researchers, scientists and government agencies, always gets neglected.

"And yet, if anything, determining the file dependencies and build order of a Fortran 90 program is more difficult than for a C program. (Maybe that?s why most tools don?t handle Fortran.) Where dependencies arise in C via source files with #include directives, and the header files they include, a single Fortran 90 file can include multiple modules, each of which can be ?used? by other files, creating build order dependencies. Add to that that most Fortran compilers generate module files in addition to object files, and you have a reasonably complicated soup to digest," Dr. McCormack wrote.

The result of the work is called TCBuild, and the article goes into healthy detail about how to exploit this tool. TCBuild is supplied under the BSD license and is free.