Boost logo

Boost-Build :

Subject: [Boost-build] How to implement extra --prefix installation if designated by command line
From: Dmitry Timoshenko (dimentiy2k_at_[hidden])
Date: 2011-06-06 15:22:29


Hello,

There is a library, it's always installed into predefined subfolder, I
setup this within bjam script.
It's also wanted to have extra installation but only if --prefix=xx
parameter is specified.

I realize how to get the parameter, something like this may be:

#-------------------------------------------------------------------------
local prefix-dir = [ MATCH "^--prefix=(.*)" : [ modules.peek : ARGV ] ] ;
if $(prefix-dir)
{
   path-constant PREFIX_DIR : $(prefix-dir) ;
}

then I would like to declare something like this:

alias unicomm_install : unicomm_native_install [HERE wanted to place
unicomm_prefix_install if $(PREFIX_DIR) != 0 else NOTHING ] ;

Where unicomm_native_install - is predefined installation,
install unicomm_native_install
   : ### sources
     unicomm
   : ### requirements
<location>$(UNICOMM_ROOT)/lib
<install-type>LIB
   ;

and unicomm_prefix_install looks like

     install unicomm_prefix_install
       : ### sources
         unicomm
       : ### requirements
<location>$(PREFIX_DIR)/lib
<install-type>LIB
       ;

How to achieve the goal correcly? It seems I'm wrong with my guess.

It's also interested to know how can I also copy header files?

Thank you.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk