Boost logo

Boost :

Subject: [boost] Exposing command line options within Jamroot
From: Brook Milligan (brook_at_[hidden])
Date: 2009-03-19 11:11:25


I am helping to maintain the pkgsrc packages for Boost. 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)

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.

Thank you very much.

Cheers,
Brook


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk