diff --git a/src/build/toolset.py b/src/build/toolset.py index 3665ab872..e969123d4 100644 --- a/src/build/toolset.py +++ b/src/build/toolset.py @@ -362,7 +362,7 @@ def __add_flag (rule_or_module, variable_name, condition, values): assert m module = m.group(1) - __module_flags.setdefault(m, []).append(f) + __module_flags.setdefault(module, []).append(f) __flags.setdefault(rule_or_module, []).append(f) __requirements = [] diff --git a/src/tools/common.py b/src/tools/common.py index b1ee26f0c..7a9348bf2 100644 --- a/src/tools/common.py +++ b/src/tools/common.py @@ -173,6 +173,7 @@ def check_init_parameters(toolset, requirement, *args): The return value from this rule is a condition to be used for flags settings. """ + from b2.build import toolset as b2_toolset # The type checking here is my best guess about # what the types should be. assert(isinstance(toolset, str)) @@ -233,6 +234,11 @@ def check_init_parameters(toolset, requirement, *args): sig = sig + value + '-' + # if a requirement is specified, the signature should be unique + # with that requirement + if requirement: + sig += '-' + requirement + if __all_signatures.has_key(sig): message = "duplicate initialization of '%s' with the following parameters: " % toolset @@ -255,7 +261,7 @@ def check_init_parameters(toolset, requirement, *args): if requirement: r = ['' + toolset, requirement] r = ','.join(r) - toolset.add_requirements([r + ':' + c for c in subcondition]) + b2_toolset.add_requirements([r + ':' + c for c in subcondition]) # We add the requirements, if any, to the condition to scope the toolset # variables and options to this specific version. diff --git a/src/tools/midl.py b/src/tools/midl.py index 43bcdf6fe..86c1f34b6 100644 --- a/src/tools/midl.py +++ b/src/tools/midl.py @@ -22,7 +22,7 @@ type.register('IDL', ['idl']) # to resources of an application (.rc). In order to be found by a resource # compiler its target type should be derived from 'H' - otherwise # the property '' will be ignored. -type.register('MSTYPELIB', 'tlb', 'H') +type.register('MSTYPELIB', ['tlb'], 'H') # Register scanner for MIDL files class MidlScanner(scanner.Scanner): diff --git a/src/tools/msvc.py b/src/tools/msvc.py index 1f9cc2ccb..7daadffd9 100644 --- a/src/tools/msvc.py +++ b/src/tools/msvc.py @@ -115,7 +115,10 @@ def init(version = None, command = None, options = None): command = to_seq(command) if command: - options.append(""+command) + if isinstance(command, str): + options.append('' + command) + else: + options.extend(""+cmd for cmd in command) configure(version,options) def configure(version=None, options=None): diff --git a/src/util/path.py b/src/util/path.py index 011be7370..d602598c9 100644 --- a/src/util/path.py +++ b/src/util/path.py @@ -446,7 +446,11 @@ def programs_path (): for elem in raw: if elem: for p in elem.split(os.path.pathsep): - result.append(make(p)) + # it's possible that the user's Path has + # double path separators, thus it is possible + # for p to be an empty string. + if p: + result.append(make(p)) return result