Boost logo

Boost Users :

Subject: Re: [Boost-users] jam environment variables
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-09-13 12:04:58


Mika Heiskanen wrote:

> Hello,
>
> Jam documentation mentions that "Jam picks up variable settings from your
> environment by default". However, I could not find any documentation on what
> environment variables affect what options. In particular, I am looking for a
> way to pass on to Jam the --layout and --build-type options via environment
> variables. Currently I am building a boost rpm for local distribution by using
> the following command sequence in the rpm .spec file:
>
> %build
> ./configure --prefix=%{_prefix} --libdir=%{_libdir}
> cat Makefile | sed -e 's/BJAM_CONFIG=/BJAM_CONFIG=--layout=system
> --build-type=complete/' > Makefile.new
> mv Makefile.new Makefile
> make all
>
> If I understand correctly, I should be able to define the compile options via
> environment variables instead of resorting to a hack like above.
>
> I'd appreciate any pointers to more detailed documentation on how to
> accomplish the above with environment variables alone.

It's not possible. Whereas all environment variables are picked from
environemnt in are present in global jam module and can be accessed
as documented in the manual, no environment variable affects layout
or build type.

The only (good) think that configure call above does is creating
user-config.jam file with some guessed values. If you look at Makefile,
you can find --user-config option is used to point Boost.Build at that
user-config.jam. So, instead of using make, you can invoke bjam as:

        bjam --user-config=<user-config.jam> <other options>

and you'll be in position to pass whatever options you want.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net