Boost logo

Boost :

Subject: Re: [boost] Exposing command line options within Jamroot
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-03-19 15:02:43

Brook Milligan wrote:

> I am helping to maintain the pkgsrc packages for Boost.

Hi Brook,

> When
> compiling the shared libraries it is important to inject rpath
> information into them so that the linker will correctly find
> dependencies. Thus, I would like to add a <dll-path> clause to the
> following stanza in Jamroot.
> # Install just library.
> install stage-proper
> : libs/$(libraries)/build
> : <location>$(stage-locate)/lib
> <install-dependencies>on <install-type>LIB
> <install-no-version-symlinks>on
> ;
> explicit stage-proper ;
> The obvious thing is to use something like
> <dll-path>$(libdir) or <dll-path>$(lib-locate)

First, a couple of meta-notes:

1. It is not possible to do this unconditionally. In particular,
Debian policy disallow embedding rpath into shared library.

2. It is probably more reasonable to do this for install target,
since stage target does not really know or care about --prefix
or anything like that.

> since those variables should be derived from the various bjam command
> line options or defaults. However, this variable (as well as the
> other obvious candidates like $(prefix), $(exec_prefix), etc.) do not
> seem to be defined within the context of Jamroot. The only place I am
> aware of these command line arguments being handled is deep within
> boost/tools/build/v2/tools/package.jam, in which case they are part of
> the install rule. I am guessing that burying the logic like that
> prevents the variables from being useful anywhere else, but I know
> very little about how bjam actually works.
> Thus, I believe there are two options:
> - Modify Jamroot itself or some other *.jam file to expose these
> variables (prefix, exec_prefix, etc. or some appropriate subset of
> them) so that command line options can better control what bjam
> does.
> - Modify Jamroot to introduce a new command line argument (e.g.,
> --dll-path) and variable ($(dll-path)) to use for this specific
> purpose.
> I would like the solution to be one that will be acceptable into the
> Boost code base. Please advise me on how to proceed.

Well, the simplest approach is to do:

        bjam <other relevant options, properties and targets> dll-path=whatever-you-want

This should work with unmodified Boost.Build or Jamroot.

BTW, please follow-up on

- Volodya

> Thank you very much.
> Cheers,
> Brook
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at