diff --git a/v2/build-system.jam b/v2/build-system.jam index 67def964d..a555b610d 100644 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -215,9 +215,9 @@ local rule find-target ( target-id ) # Initializes a new configuration module. # -local rule initialize-config-module ( module-name ) +local rule initialize-config-module ( module-name : location ? ) { - project.initialize $(module-name) ; + project.initialize $(module-name) : $(location) ; if USER_MODULE in [ RULENAMES ] { USER_MODULE $(module-name) ; @@ -419,7 +419,7 @@ local rule load-configuration-files } if $(file) { - initialize-config-module project-config ; + initialize-config-module project-config : $(file:D) ; load-config project-config : project-config.jam : $(file:D) ; } } diff --git a/v2/build_system.py b/v2/build_system.py index 6e33bee77..55d8b806c 100644 --- a/v2/build_system.py +++ b/v2/build_system.py @@ -172,9 +172,9 @@ def find_target(target_id): return result -def initialize_config_module(module_name): +def initialize_config_module(module_name, location=None): - get_manager().projects().initialize(module_name) + get_manager().projects().initialize(module_name, location) # Helper rule used to load configuration files. Loads the first configuration # file with the given 'filename' at 'path' into module with name 'module-name'. @@ -335,7 +335,7 @@ def load_configuration_files(): file = b2.util.path.glob_in_parents(".", ["project-config.jam"]) if file: - initialize_config_module('project-config') + initialize_config_module('project-config', os.path.dirname(file[0])) load_config('project-config', "project-config.jam", [os.path.dirname(file[0])], True)