Boost logo

Boost-Build :

From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2006-09-20 18:16:03

On Sep 20, 2006, at 12:06 AM, Ilya Sokolov wrote:

> K. Noel Belcourt wrote:
>> Hi,
>> I'd like to invoke a bjam built executable in an actions. For
>> example, I have an exe target, xmlc,
>> exe xmlc : source ;
>> that I'd like to use in an actions but I don't know how to reference
>> xmlc in the actions. Also, is there some way to make an actions
>> depend on a target so that the executable will be built before the
>> actions that invokes the executable is run?
> read
> Boost.Build_V2/UsingBuiltTool


This is an elegant solution if only I could make it work. The
COMMAND is not built before it's used in the actions. It may be that
the way I'm using it is the problem, not sure. This is what I've got
so far.

# xmldb.jam
feature inline-binary : : free dependency ;
toolset.flags xmldb.concat.xml COMMAND <inline-binary> ;

type.register XML : xml ;
type.register XMLDB : xmldb ;
generators.register-composing xmldb.concat.xml : XML : XMLDB ;

actions xmldb.concat.xml bind COMMAND
   $(COMMAND) $(<) $(>)

# xmlconcat.jam
exe xmlc : $(source-files) ;

# parser.jam
import xmldb ;
xmldb foo.db : main.xml : <inline-binary>/xmlconcat//xmlc ;

When I build, the value of COMMAND is bin/xmlconcat/gcc-3.4.3/debug/
xmlc but there is no executable in that directory, so it doesn't
appear to be building it before using it. Can you see what I'm doing


-- Noel

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