From be7f7e47f4602cb010cd26f739496367e91ff2e6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 15 Jun 2005 11:43:50 +0000 Subject: [PATCH] Report location of site-config and user-config before loading them, so that we output location even if site-config exists with a fatal error. [SVN r29584] --- src/build-system.jam | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) 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) ; }