diff --git a/new/feature.jam b/new/feature.jam index c6cf1b177..3f439a1af 100644 --- a/new/feature.jam +++ b/new/feature.jam @@ -300,7 +300,15 @@ rule expand-subfeatures ( local result ; for local p in $(properties) { - result += [ expand-subfeatures-aux $(p:G) : $(p:G=) ] ; + # Don't expand subfeatures in subfeatures + if ! [ MATCH "(:)" : $(p:G) ] + { + result += [ expand-subfeatures-aux $(p:G) : $(p:G=) ] ; + } + else + { + result += $(p) ; + } } return $(result) ; } diff --git a/v2/build/feature.jam b/v2/build/feature.jam index c6cf1b177..3f439a1af 100644 --- a/v2/build/feature.jam +++ b/v2/build/feature.jam @@ -300,7 +300,15 @@ rule expand-subfeatures ( local result ; for local p in $(properties) { - result += [ expand-subfeatures-aux $(p:G) : $(p:G=) ] ; + # Don't expand subfeatures in subfeatures + if ! [ MATCH "(:)" : $(p:G) ] + { + result += [ expand-subfeatures-aux $(p:G) : $(p:G=) ] ; + } + else + { + result += $(p) ; + } } return $(result) ; }