diff options
author | Simon Warta <[email protected]> | 2017-04-09 17:13:30 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-04-18 09:36:25 +0200 |
commit | c84873cf7ec2f6a488b144dd57859ab8bff5c169 (patch) | |
tree | e5d73f1d6728dca127ca5d124e045275b6756dcf | |
parent | d31a991f5fb0859892261dd0bda018b6fdb99b25 (diff) |
Pass full path to load_build_data()
-rwxr-xr-x | configure.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/configure.py b/configure.py index d4e8e59d8..a32065d8f 100755 --- a/configure.py +++ b/configure.py @@ -2526,14 +2526,14 @@ def main(argv=None): [ModuleInfo(info) for info in find_files_named('info.txt', options.lib_dir)]]) - def load_build_data(descr, subdir, class_t): + def load_build_data(descr, search_dir, class_t): info = {} - subdir = os.path.join(options.build_data, subdir) + for filename in os.listdir(search_dir): + print(os.path.join(search_dir, filename)) + if filename.endswith('.txt'): + info[filename.replace('.txt', '')] = class_t(os.path.join(search_dir, filename)) - for fsname in os.listdir(subdir): - if fsname.endswith('.txt'): - info[fsname.replace('.txt', '')] = class_t(os.path.join(subdir, fsname)) if len(info) == 0: logging.warning('Failed to load any %s files' % (descr)) else: @@ -2542,14 +2542,14 @@ def main(argv=None): return info - info_arch = load_build_data('CPU info', 'arch', ArchInfo) - info_os = load_build_data('OS info', 'os', OsInfo) - info_cc = load_build_data('compiler info', 'cc', CompilerInfo) + info_arch = load_build_data('CPU info', os.path.join(options.build_data, 'arch'), ArchInfo) + info_os = load_build_data('OS info', os.path.join(options.build_data, 'os'), OsInfo) + info_cc = load_build_data('compiler info', os.path.join(options.build_data, 'cc'), CompilerInfo) for mod in modules.values(): mod.cross_check(info_arch, info_os, info_cc) - module_policies = load_build_data('module policy', 'policy', ModulePolicyInfo) + module_policies = load_build_data('module policy', os.path.join(options.build_data, 'policy'), ModulePolicyInfo) for policy in module_policies.values(): policy.cross_check(modules) |