diff --git a/new/feature.jam b/new/feature.jam index 2a13b2e14..0bd3933d6 100644 --- a/new/feature.jam +++ b/new/feature.jam @@ -108,7 +108,7 @@ rule feature ( name : values * : attributes * ) } # returns true iff all elements of names are valid features. -rule valid ( name + ) +rule valid ( names + ) { if $(names) in $(all-features) { @@ -119,6 +119,10 @@ rule valid ( name + ) # return the attibutes of the given feature rule attributes ( feature ) { + if ! [ valid $(feature) ] + { + error \"$(feature)\" is not a valid feature name ; + } return $($(feature).attributes) ; } diff --git a/v2/build/feature.jam b/v2/build/feature.jam index 2a13b2e14..0bd3933d6 100644 --- a/v2/build/feature.jam +++ b/v2/build/feature.jam @@ -108,7 +108,7 @@ rule feature ( name : values * : attributes * ) } # returns true iff all elements of names are valid features. -rule valid ( name + ) +rule valid ( names + ) { if $(names) in $(all-features) { @@ -119,6 +119,10 @@ rule valid ( name + ) # return the attibutes of the given feature rule attributes ( feature ) { + if ! [ valid $(feature) ] + { + error \"$(feature)\" is not a valid feature name ; + } return $($(feature).attributes) ; }