From 875a194dae1dfa6fdcd4a7f0a9c9dbb8ca338927 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Wed, 17 Apr 2013 13:46:01 +0100 Subject: [PATCH] Attempt to reduce moses-support e-mails --- jam-files/boost-build/build-system.jam | 7 ------- jam-files/sanity.jam | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/jam-files/boost-build/build-system.jam b/jam-files/boost-build/build-system.jam index 9f9c884cc..87e1df633 100644 --- a/jam-files/boost-build/build-system.jam +++ b/jam-files/boost-build/build-system.jam @@ -596,13 +596,6 @@ local rule should-clean-project ( project ) } } - ECHO "warning: No toolsets are configured." ; - ECHO "warning: Configuring default toolset" \"$(default-toolset)\". ; - ECHO "warning: If the default is wrong, your build may not work correctly." ; - ECHO "warning: Use the \"toolset=xxxxx\" option to override our guess." ; - ECHO "warning: For more configuration options, please consult" ; - ECHO "warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; - toolset.using $(default-toolset) : $(default-toolset-version) ; } diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam index 7f9c45d83..672502ba0 100644 --- a/jam-files/sanity.jam +++ b/jam-files/sanity.jam @@ -265,6 +265,26 @@ rule add-post-hook ( names * ) { post-hooks += $(names) ; } +rule failure-message ( ok ? ) { + if $(ok) != "ok" { + local args = [ modules.peek : ARGV ] ; + local args = $(args:J=" ") ; + if --debug-configuration in [ modules.peek : ARGV ] { + echo "The build failed with command line: " ; + echo " $(args)" ; + echo "If you need support, attach the full output to your e-mail." ; + } else { + echo "The build failed. If you need support, run:" ; + echo " $(args) --debug-configuration -d2 >build.log" ; + echo "then attach build.log to your e-mail." ; + } + echo "ERROR" ; + } else { + echo "SUCCESS" ; + } +} +add-post-hook failure-message ; + import feature : feature ; feature options-to-write : : free ; import toolset : flags ;