List Info

Thread: property value?




<toolset> property value?
user name
2006-09-25 06:37:47
Hello,

I'd like to have different stage locations for different
toolsets for 
the code

install stage
    :   /libs/$(libraries)
    :   <location>stage/$(toolset_name)
    ;

How it is possible to get <toolset>  value?

Thanks,
Michael Krasnyk

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
<toolset> property value?
user name
2006-09-25 07:32:27
> Hello,
>
> I'd like to have different stage locations for
different toolsets for
> the code
>
> install stage
>     :   /libs/$(libraries)
>     :   <location>stage/$(toolset_name)
>     ;
>
> How it is possible to get <toolset>  value?

  You could use the <conditional> feature to add
requirements
dynamically. More information about this feature can be
found at

http://boost
.org/boost-build2/doc/html/bbv2/advanced/targets.html#bbv2.a
dvanced.targets.requirements

----
import feature ;

install stage
   :   /libs/$(libraries)
   :   <conditional>toolset-path
   ;

rule toolset-path ( properties * )
{
    # Get toolset and toolset version
    local toolset = [ feature.get-values <toolset> :
$(properties) ] ;
    local version = [ feature.get-values
<toolset-$(toolset):version>
: $(properties) ] ;

    # Add this to the requirements
    return <location>stage/$(toolset)/$(version) ;
}
----
-- 
Bojan Resnik
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
<toolset> property value?
user name
2006-09-25 08:40:12
Bojan Resnik wrote:

>  You could use the <conditional> feature to add
requirements
>dynamically. More information about this feature can be
found at
>  
>
Thanks, it works for me.

But one more question. Is it possible
to use some "global" properties and initialize
global path variable, like
path-constant STAGE_DIR : $(stage-locate) ;

I need it, because in subprojects the variable is used as:
install stage
    : $(lang)
    :
<location>$(STAGE_DIR)/locale/$(lang)/LC_MESSAGES
      <name>bar.mo
    ;

Regards,
Michael Krasnyk

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
<toolset> property value?
user name
2006-09-30 16:41:54
On Monday 25 September 2006 12:40, Michael Krasnyk wrote:
> Bojan Resnik wrote:
> >  You could use the <conditional> feature to
add requirements
> >dynamically. More information about this feature
can be found at
>
> Thanks, it works for me.
>
> But one more question. Is it possible
> to use some "global" properties and
initialize global path variable, like
> path-constant STAGE_DIR : $(stage-locate) ;

I don't quite understand this question. Do you want
'stage-locate' to be 
dynamically computed? No, that's no possible:

   http://boost.org/boost-build2/doc/html/bbv2/faq.ht
ml#id2579924

> I need it, because in subprojects the variable is used
as:
> install stage
>
>     : $(lang)
>     :
<location>$(STAGE_DIR)/locale/$(lang)/LC_MESSAGES
>
>       <name>bar.mo
>     ;

Again, you can use conditional requirements. To avoid
duplicating those 
requirements everywhere, you can either use project
requirements, or new main 
target rule 'my-stage' that does that:

  http://boost.org/boost-build2/doc/html/bbv2/exte
nding/rules.html

HTH,
Volodya
-- 
Vladimir Prus
http://vladimir_pru
s.blogspot.com
Boost.Build V2: http://boost.org/boost-
build2
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1-4]

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