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


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
   : ### requirements

and unicomm_prefix_install looks like

     install unicomm_prefix_install
       : ### sources
       : ### requirements

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, david.abrahams at, gregod at, cpdaniel at, john at