diff --git a/v2/build/generators.jam b/v2/build/generators.jam index 4ad80a36e..0df66fc3d 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -60,12 +60,13 @@ if "--debug-generators" in [ modules.peek : ARGV ] # Updated cached viable source target type information as needed after a new -# derived target type gets added. This is needed because if a target type is a -# viable source target type for some generator then all of the target type's -# derived target types are automatically viable as source target types for the -# same generator. Does nothing if a non-derived target type is passed to it. +# target type gets defined. This is needed because if a target type is a viable +# source target type for some generator then all of the target type's derived +# target types should automatically be considered as viable source target types +# for the same generator as well. Does nothing if a non-derived target type is +# passed to it. # -rule update-viable-source-target-type-cache-with-derived-type ( type ) +rule update-cached-information-with-a-new-type ( type ) { local base-type = [ type.base $(type) ] ; if $(base-type) diff --git a/v2/build/type.jam b/v2/build/type.jam index 67f3e9f25..0fdef8c3f 100644 --- a/v2/build/type.jam +++ b/v2/build/type.jam @@ -80,11 +80,7 @@ rule register ( type : suffixes * : base-type ? ) # Adding a new derived type affects generator selection so we need to # make the generator selection module update any of its cached # information related to a new derived type being defined. - if $(base-type) - { - generators.update-viable-source-target-type-cache-with-derived-type - $(type) ; - } + generators.update-cached-information-with-a-new-type $(type) ; } }