Skip to content

Commit

Permalink
makedep: Include C derived object files in list of "externals"
Browse files Browse the repository at this point in the history
Applying makedep to a single shot build of FMS+MOM6 (i.e. skipping the libFMS.a) I found the list of objects was incomplete because the C files were not covered by the module dependencies. makedep figures out the Fortran module dependencies and then has a list of "externals" to cover all the files that don't provide modules. "externals" are always compiled, in lieu of flinting the source code. This commit simply adds all the C object files to the list of externals. When building a library, the module dependencies are ignore and everything gets built, which is why this gap was not seen before.
  • Loading branch information
adcroft authored and marshallward committed Dec 9, 2022
1 parent 01242a7 commit 8f7b1fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ac/makedep
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def create_deps(src_dirs, makefile, debug, exec_target, fc_rule,
_, _, cpp, inc, _ = scan_fortran_file(f)
# maps object file to .h files included
o2h[object_file(f)] = cpp
externals.append(object_file(f))

# Are we building a library, single or multiple executables?
targ_libs = []
Expand Down

0 comments on commit 8f7b1fb

Please sign in to comment.