Boost logo

Boost-Build :

Subject: [Boost-build] using make rule in conjunction with target-os
From: Jim Gallagher (jim_at_[hidden])
Date: 2010-05-28 13:35:40

In our project tree, we have some sub-projects that are just scripts.
Nothing to build, but I would like to have these staged along with the
stuff that is built. Some of the scripts are not portable, so I would
like to do something like this:

constant CONFIG : $(STAGE_SERVER)/resources/config.dat ;
constant SCRIPT : $(STAGE_SERVER)/bin/ ;
constant SCRIPT2 : $(STAGE_SERVER)/bin/script.bat ;

make $(CONFIG) : config.dat : @common.copy ;
make $(SCRIPT) : script.bat : @common.copy : <target-os>windows ;
make $(SCRIPT2) : : @common.copy : <target-os>hpux ;

alias stage : $(CONFIG) $(SCRIPT) $(SCRIPT2) ;

The problem is that the make rule does not seem to pay attention to
the target-os requirement. Is this intentional?

Is there an easy way to do this without using if blocks?

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at