Squashed commit of the following:

commit b02b2d6d0d462310b313588ca7705d391e830eeb
Author: Michael Hirsch, Ph.D <scivision@users.noreply.github.com>
Date:   Sun Mar 10 03:51:09 2019 -0400

    cleanup

commit 3311ff5fb12577c78671bf2ff2787d28b86ba5fa
Author: Michael Hirsch, Ph.D <scivision@users.noreply.github.com>
Date:   Sun Mar 10 03:50:30 2019 -0400

    more robust

commit 8030dcb76698b148ee47ecded1f33b6d3821cca2
Author: Michael Hirsch, Ph.D <scivision@users.noreply.github.com>
Date:   Sun Mar 10 03:30:05 2019 -0400

    inwork compiles OK but needs smod filenames
pull/5039/head
Michael Hirsch, Ph.D 6 years ago
parent 2a830743cc
commit 434599cc12
  1. 24
      mesonbuild/backend/ninjabackend.py

@ -1848,8 +1848,9 @@ rule FORTRAN_DEP_HACK%s
else:
submodmatch = submodre.match(line)
if submodmatch is not None:
# '_' is arbitrarily used to distinguish submod from mod.
submodname = '_' + submodmatch.group(2).lower()
parents = submodmatch.group(1).lower().split(':')
submodname = parents[0] + '_' + submodmatch.group(2).lower()
if submodname in submodule_files:
raise InvalidArguments(
'Namespace collision: submodule %s defined in '
@ -1907,23 +1908,26 @@ rule FORTRAN_DEP_HACK%s
'submodule ancestry must be specified as'
' ancestor:parent but Meson found {}'.parents)
if len(parents) == 2:
parents[1] = '_' + parents[1]
ancestor_child = '_'.join(parents)
for parent in parents:
if parent not in tdeps:
raise MesonException("submodule {} relies on parent module {} that was not found.".format(submodmatch.group(2).lower(), parent))
submodsrcfile = srcdir / tdeps[parent].fname
if ancestor_child not in tdeps:
raise MesonException("submodule {} relies on ancestor module {} that was not found.".format(submodmatch.group(2).lower(), ancestor_child.split('_')[0]))
submodsrcfile = srcdir / tdeps[ancestor_child].fname
if not submodsrcfile.is_file():
if submodsrcfile.name != src.name: # generated source file
pass
else: # subproject
continue
elif submodsrcfile.samefile(src): # self-reference
continue
<<<<<<< HEAD
mod_name = compiler.module_name_to_filename(parent)
mod_files.append(str(dirname / mod_name))
>>>>>>> allow fortran submodule to have same name as module
=======
elif submodsrcfile.samefile(src): # self-reference
continue
mod_name = compiler.module_name_to_filename(ancestor_child)
mod_files.append(str(dirname / mod_name))
>>>>>>> Squashed commit of the following:
mod_files = _scan_fortran_file_deps(src, srcdir, dirname, tdeps, compiler)
return mod_files

Loading…
Cancel
Save