List Info

Thread: Re: How to specify different install rules fordifferent variants?




Re: How to specify different install rules fordifferent variants?
country flaguser name
France
2007-03-30 04:31:21
> Now, I want to specify install rule for my target but I
want install 
> location to be different for different build variants.
For example, when 
> building debug variant I want location to be /bin/debug
and for release 
> variant /bin/release. 

I have a similar problem, i would like to change the name of
the
file to add a .d at the end if i'm using a debug variant. 

I have seen that i can use a tag-feature/rule to modify the
name of generated
file but i don't know how can i test the "type"
and "property-set" parameters ? 

rule my-tag ( name : type ? : property-set ) 
{
	return "" ; 
}

exe toto : toto.cpp : <tag>my-tag ; 
install dist : toto ; 

Where can i find more information ? 

Thanks,

Renaud
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: How to specify different install rules fordifferent variants?
country flaguser name
Spain
2007-03-30 04:58:29
The following is the tag rule used in boost, I used to copy
from it and 
adjust to my needs:

# This rule is called by Boost.Build to determine the name
of
# target. We use it to encode build variant, compiler name
and
# boost version in the target name
rule tag ( name : type ? : property-set )
{
    if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
    {
        if $(layout) = versioned
        {
            local result = [ common.format-name
                <base> <toolset>
<threading> <runtime> -$(BOOST_VERSION_TAG)
                -$(BUILD_ID)
                : $(name) : $(type) : $(property-set) ] ;
           
            # Optionally add version suffix.
            # On NT, library with version suffix won't be
recognized
            # by linkers. On CYGWIN, we get strage duplicate
symbol
            # errors when library is generated with version
suffix.
            # On OSX, version suffix is not needed -- the
linker expets
            # libFoo.1.2.3.dylib format.
            # AIX linkers don't accept version suffixes
either.
            if $(type) = SHARED_LIB &&
              ! ( [ $(property-set).get <target-os> ]
in windows cygwin 
darwin aix )
            {
                result = $(result).$(BOOST_VERSION)  ;
            }
           
            return $(result) ;
        }
        else
        {
            return [ common.format-name
                <base> <threading>
<runtime> -$(BUILD_ID)
                : $(name) : $(type) : $(property-set) ] ;
        }
    }
}

regards,

Jorge

Renaud Lepere wrote:
>> Now, I want to specify install rule for my target
but I want install 
>> location to be different for different build
variants. For example, when 
>> building debug variant I want location to be
/bin/debug and for release 
>> variant /bin/release. 
>>     
>
> I have a similar problem, i would like to change the
name of the
> file to add a .d at the end if i'm using a debug
variant. 
>
> I have seen that i can use a tag-feature/rule to modify
the name of generated
> file but i don't know how can i test the
"type" and "property-set" parameters ? 
>
> rule my-tag ( name : type ? : property-set ) 
> {
> 	return "" ; 
> }
>
> exe toto : toto.cpp : <tag>my-tag ; 
> install dist : toto ; 
>
> Where can i find more information ? 
>
> Thanks,
>
> Renaud
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>   

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )