From 968968cd32d430bfe8ccc5ebeaa5a77f3dd95689 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 1 Jan 2002 18:58:05 +0000 Subject: [PATCH] minor bug fix [SVN r12195] --- new/feature.jam | 6 +++++- v2/build/feature.jam | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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) ; }