Append to list in boost build/b2/bjam

52 Views Asked by At

I would like to know how one can append items to a list in boost build/b2/bjam.

I am sure this must be easy but the search engines do not provide a result. Also Ctrl+F in the documentation does not help!

1

There are 1 best solutions below

0
Gabriel Devillers On BEST ANSWER

The operator to use is += as in GNU Make.

Example:

MYLIST = a b ;
MYLIST += c ;
echo $(MYLIST) ;

Shows: a b c

And to concatenate lists:

MYLIST = a b c ;
OTHERLIST = dd ee ;
MYLIST += $(OTHERLIST) ;
echo $(MYLIST) ;
import sequence ;
echo length: [ sequence.length $(MYLIST) ] ;

Shows: a b c dd ee length: 5

More information can be found in the Variables section of the documentation.