@conf
def modfile(conf, name):
    """
	Turns a module name into the right module file name.
	Defaults to all lower case.
	"""
    if name.find(':') >= 0:
        separator = conf.env.FC_SUBMOD_SEPARATOR or '@'
        modpath = name.split(':')
        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']
