From a5d1abd22fd734d6be1e24e647eabc88bb5bd9c9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 9 Apr 2006 07:20:25 +0000 Subject: [PATCH] Only show tool not found warnings when dubgging configuration. This is to prevent spurious warnings when trying to set up varied tools and they are not usually available on a given platform. [SVN r33604] --- src/tools/common.jam | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/tools/common.jam b/src/tools/common.jam index 06d66366d..00b8d8284 100644 --- a/src/tools/common.jam +++ b/src/tools/common.jam @@ -17,6 +17,10 @@ import path ; import sequence ; import toolset ; +if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] +{ + .debug-configuration = true ; +} # Configurations # @@ -230,8 +234,11 @@ rule get-invocation-command ( command = [ common.find-tool $(tool) : $(additional-paths) : $(path-last) ] ; if ! $(command) { - ECHO "warning: toolset $(toolset) initialization: can't find tool $(tool)" ; - ECHO "warning: initialized from" [ errors.nearest-user-location ] ; + if $(.debug-configuration) + { + ECHO "warning: toolset $(toolset) initialization: can't find tool $(tool)" ; + ECHO "warning: initialized from" [ errors.nearest-user-location ] ; + } } } else @@ -239,9 +246,12 @@ rule get-invocation-command ( command = [ common.check-tool $(user-provided-command) ] ; if ! $(command) { - ECHO "warning: toolset $(toolset) initialization: " ; - ECHO "warning: can't find user-provided command '$(user-provided-command:J= )'" ; - ECHO "warning: initialized from" [ errors.nearest-user-location ] ; + if $(.debug-configuration) + { + ECHO "warning: toolset $(toolset) initialization: " ; + ECHO "warning: can't find user-provided command '$(user-provided-command:J= )'" ; + ECHO "warning: initialized from" [ errors.nearest-user-location ] ; + } # It's possible, in theory, that user-provided command is OK, but we're # not smart enough to understand that. command = $(user-provided-command) ;