diff --git a/src/build-system.jam b/src/build-system.jam index e4ae525b6..f33155295 100755 --- a/src/build-system.jam +++ b/src/build-system.jam @@ -56,21 +56,29 @@ module site-config } if ! $(ignore-config) -{ +{ + local path ; if [ os.name ] in NT CYGWIN { - modules.load site-config : : [ modules.peek : SystemRoot ] $(user-path) ; + path = [ modules.peek : SystemRoot ] $(user-path) ; } else { - modules.load site-config : : /etc $(user-path) ; + path = /etc $(user-path) ; } + if --debug-configuration in [ modules.peek : ARGV ] { - ECHO "notice: loaded site-config.jam from " - [ NORMALIZE_PATH [ modules.binding site-config ] ] ; - } + local where = [ GLOB $(path) : site-config.jam ] ; + if $(where) + { + ECHO "notice: loading site-config.jam from" + [ NORMALIZE_PATH $(where[1]) ] ; + } + } + + modules.load site-config : : $(path) ; } @@ -83,12 +91,17 @@ module user-config if ! $(ignore-config) { - modules.load user-config : : $(user-path) ; if --debug-configuration in [ modules.peek : ARGV ] { - ECHO "notice: loaded user-config.jam from " - [ NORMALIZE_PATH [ modules.binding user-config ] ] ; + local where = [ GLOB $(user-path) : user-config.jam ] ; + if $(where) + { + ECHO "notice: loading user-config.jam from" + [ NORMALIZE_PATH $(where[1]) ] ; + } } + + modules.load user-config : : $(user-path) ; }