diff --git a/v2/build/generators.jam b/v2/build/generators.jam index fc478bfcf..6b3be2f5b 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -999,7 +999,7 @@ local rule find-viable-generators-aux ( target-type : property-set ) return $(viable-generators) ; } -local rule find-viable-generators ( target-type : property-set ) +rule find-viable-generators ( target-type : property-set ) { local key = $(target-type).$(property-set) ; local l = $(.fv.$(key)) ; diff --git a/v2/build/targets.jam b/v2/build/targets.jam index 6a0bee59b..612a5ad1a 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1241,8 +1241,21 @@ class typed-target : basic-target # ] : $(source-targets) ] ; if ! $(r) - { - errors.error "unable to construct" [ full-name ] ; + { + ECHO "error: unable to construct " [ full-name ] ; + + # Are there any top-level generators for this type/property set. + if ! [ generators.find-viable-generators + $(self.type) : $(property-set) ] + { + ECHO "error: no generators were found for type '$(self.type)'" ; + ECHO "error: and the requested properties" ; + ECHO "error: make sure you've configured the needed tools" ; + ECHO "See http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ; + } + + ECHO "To debug this problem, try the --debug-generators option." ; + EXIT ; } return $(r) ;