Hi,

I'm trying to find a way to use build options in a rule.
This is my Jamfile for the Boost library:
# Boost 1.35
# /3rd-party/boost/Jamfile

rule boostlib ( name : property-set ) {
        # path
        local libpath = "lib" ;

        # library
        local prefix = "boost_" ;
        local libname = $(name) ;

        if [ $(property-set).get <toolset> ] = gcc {
                libname = $(libname)"-gcc" ;

                # TODO: check for GCC version
                # <toolset-gcc:version>
        }

        # threading tag
        if [ $(property-set).get <threading> ] = multi {
                libname = $(libname)"-mt" ;
        }

        # variant tag
        if [ $(property-set).get <variant> ] = debug {
                libname = $(libname)"-d" ;
        }

        # add lib to project
        lib $(name) : : $(prefix)$(libname) <search>$(libpath) ;
}

project boost
        : requirements
                <include>"include"
        : usage-requirements
                <include>"include"
        ;

# only include headers
alias headers : : : : ;

# link libraries
boostlib regex ;


bjam's output:
../../3rd-party/boost/Jamfile:44: in modules.load
*** argument error
* rule boostlib ( name : property-set )
* called with: ( regex )
* missing argument property-set
../../3rd-party/boost/Jamfile:6:see definition of rule 'boostlib' being called