diff options
author | lloyd <[email protected]> | 2014-01-12 17:20:17 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-12 17:20:17 +0000 |
commit | 560b7671685317035e724b4c75030dc5cf86f461 (patch) | |
tree | cd8f0fa2042bdaabe2312c26e79e8584874529e0 /configure.py | |
parent | e8ec0d45423a7729622040986ee6b1f3b4b9a026 (diff) |
Generalize .obj renaming
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.py b/configure.py index e76ddf14c..b711d11e3 100755 --- a/configure.py +++ b/configure.py @@ -1057,8 +1057,17 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): else: name = '_'.join(dir.split(os.sep)[2:]) + '_' + file - # Special case hack cause I'm lazy - name = name.replace('tls_tls_', 'tls_') + def fixup_obj_name(name): + def remove_dups(parts): + last = None + for part in parts: + if last is None or part != last: + last = part + yield part + + return '_'.join(remove_dups(name.split('_'))) + + name = fixup_obj_name(name) else: name = file |