summaryrefslogtreecommitdiffstats
path: root/waflib/Tools/fc.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 17:31:03 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 18:14:27 +0100
commit76b2bef46c9e46bbff7d8dfe2ac5977e98d5f4dd (patch)
treeca16666879d08ad9f0657189b31b6f466417eb8a /waflib/Tools/fc.py
parent36e5b237b6e0a0a5f0c2904ad8db93bad5de6d0a (diff)
parent46ac21b8c413f73ad723499aa76ecea2f59cb57d (diff)
downloadingen-76b2bef46c9e46bbff7d8dfe2ac5977e98d5f4dd.tar.gz
ingen-76b2bef46c9e46bbff7d8dfe2ac5977e98d5f4dd.tar.bz2
ingen-76b2bef46c9e46bbff7d8dfe2ac5977e98d5f4dd.zip
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/Tools/fc.py')
-rw-r--r--waflib/Tools/fc.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/waflib/Tools/fc.py b/waflib/Tools/fc.py
index d9e8d8c4..fd4d39c9 100644
--- a/waflib/Tools/fc.py
+++ b/waflib/Tools/fc.py
@@ -28,10 +28,24 @@ def modfile(conf, name):
Turns a module name into the right module file name.
Defaults to all lower case.
"""
- return {'lower' :name.lower() + '.mod',
- 'lower.MOD' :name.lower() + '.MOD',
- 'UPPER.mod' :name.upper() + '.mod',
- 'UPPER' :name.upper() + '.MOD'}[conf.env.FC_MOD_CAPITALIZATION or 'lower']
+ if name.find(':') >= 0:
+ # Depending on a submodule!
+ separator = conf.env.FC_SUBMOD_SEPARATOR or '@'
+ # Ancestors of the submodule will be prefixed to the
+ # submodule name, separated by a colon.
+ modpath = name.split(':')
+ # Only the ancestor (actual) module and the submodule name
+ # will be used for the filename.
+ modname = modpath[0] + separator + modpath[-1]
+ suffix = conf.env.FC_SUBMOD_SUFFIX or '.smod'
+ else:
+ modname = name
+ suffix = '.mod'
+
+ return {'lower' :modname.lower() + suffix.lower(),
+ 'lower.MOD' :modname.lower() + suffix.upper(),
+ 'UPPER.mod' :modname.upper() + suffix.lower(),
+ 'UPPER' :modname.upper() + suffix.upper()}[conf.env.FC_MOD_CAPITALIZATION or 'lower']
def get_fortran_tasks(tsk):
"""