diff options
author | lloyd <[email protected]> | 2009-10-13 16:01:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-13 16:01:51 +0000 |
commit | 3bc2bb0461b1b40466821daf0061eab769621eab (patch) | |
tree | aee53148a1a582a249c879c67c9d995ce66c8052 /configure.py | |
parent | 88e03041c4c8a33a7fc3311cfca5fc398294ff08 (diff) |
Rename all of the build-data files with a .txt extension, and filter for
such in configure.py. Paul Clark reported on the list having problems with
it otherwise because of CVS droppings being picked up and subsequently
errored on when parsing them as build info files (of course) failed.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/configure.py b/configure.py index 676fa11f5..4d923d78e 100755 --- a/configure.py +++ b/configure.py @@ -270,7 +270,7 @@ def lex_me_harder(infofile, to_obj, allowed_groups, name_val_pairs): else: to_obj.parent_module = None else: - to_obj.basename = basename + to_obj.basename = basename.replace('.txt', '') lexer = shlex.shlex(open(infofile), infofile, posix=True) lexer.wordchars += '|:.<>/,-!' # handle various funky chars in info.txt @@ -883,18 +883,23 @@ def load_info_files(options): for (dirpath, dirnames, filenames) in \ os.walk(os.path.join(options.build_data, subdir)): for filename in filenames: - yield os.path.join(dirpath, filename) + if filename.endswith('.txt'): + yield os.path.join(dirpath, filename) - archinfo = dict([(os.path.basename(info), ArchInfo(info)) + def form_name(filepath): + return os.path.basename(filepath).replace('.txt', '') + + archinfo = dict([(form_name(info), ArchInfo(info)) for info in list_files_in_build_data('arch')]) - osinfo = dict([(os.path.basename(info), OsInfo(info)) + osinfo = dict([(form_name(info), OsInfo(info)) for info in list_files_in_build_data('os')]) - ccinfo = dict([(os.path.basename(info), CompilerInfo(info)) + ccinfo = dict([(form_name(info), CompilerInfo(info)) for info in list_files_in_build_data('cc')]) - del osinfo['defaults'] # FIXME (remove the file) + if 'defaults' in osinfo: + del osinfo['defaults'] # FIXME (remove the file) return (modules, archinfo, ccinfo, osinfo) |