Programmatically add to an alias?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Programmatically add to an alias?

Boost - Build mailing list
Can I declare an alias and then add targets to it?

I create run tartgets in a loop, and I'd like to be able to add them all
to an alias if possible.

Thanks, John.




---
This email has been checked for viruses by AVG.
http://www.avg.com

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Programmatically add to an alias?

Boost - Build mailing list
On Tue, May 23, 2017 at 2:12 AM, John Maddock via Boost-build <[hidden email]> wrote:
Can I declare an alias and then add targets to it?

I create run tartgets in a loop, and I'd like to be able to add them all to an alias if possible.

I don't know of the top of my head.. But can you add the targets to a list in the loop and then create the alias with the list after the loop?

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Programmatically add to an alias?

Boost - Build mailing list
On 5/23/17 7:58 AM, Rene Rivera via Boost-build wrote:

> On Tue, May 23, 2017 at 2:12 AM, John Maddock via Boost-build
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Can I declare an alias and then add targets to it?
>
>     I create run tartgets in a loop, and I'd like to be able to add
>     them all to an alias if possible.
>
>
> I don't know of the top of my head.. But can you add the targets to a
> list in the loop and then create the alias with the list after the loop?

I've done that a few times.  Something like:

local exes ;
for local s in [ glob progs/*.c ]  {
    exe $(s:B) : $(s) ;
    exes += $(s:B) ;
}
alias executables : $(exes) ;

Phillip
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Programmatically add to an alias?

Boost - Build mailing list


On 23/05/2017 14:55, Phillip Seaver via Boost-build wrote:

> On 5/23/17 7:58 AM, Rene Rivera via Boost-build wrote:
>> On Tue, May 23, 2017 at 2:12 AM, John Maddock via Boost-build
>> <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>      Can I declare an alias and then add targets to it?
>>
>>      I create run tartgets in a loop, and I'd like to be able to add
>>      them all to an alias if possible.
>>
>>
>> I don't know of the top of my head.. But can you add the targets to a
>> list in the loop and then create the alias with the list after the loop?
> I've done that a few times.  Something like:
>
> local exes ;
> for local s in [ glob progs/*.c ]  {
>      exe $(s:B) : $(s) ;
>      exes += $(s:B) ;
> }
> alias executables : $(exes) ;

Works a treat, thanks!  John.


---
This email has been checked for viruses by AVG.
http://www.avg.com

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