Boost logo

Boost-Build :

Subject: [Boost-build] Newbie question to make rule
From: Piotr Jachowicz (pjachowi_at_[hidden])
Date: 2010-06-17 15:46:53


Is there any way to force make action to be executed not in Jamroot
location, but in specific directory?

To be specific, I have following structure:


Compiling lib requires to invoke "schemagen schema.imp" which produces
two files: schema.cxx and schema.sch. The former should be compile
with other lib sources (and library moved ino bin/), the latter should
copied into bin directory. It is trivial with traditional make, but
I've failed to manage it with bjam. The problem is that "schemagen"
application produces output in current directory. I've tried to create
in lib directory Jamfile containing

actions schemagen
   schemagen $(>)

make schemagen.sch : schemagen.imp : @schemagen ;

lib schema
 : [ glob *.cpp ]
   [ glob *.cxx ]

But when I invoke bjam from Jamroot level, schemagen action produces
files schema.cxx and schema.sch in *current directory* (the same
directory where Jamroot is located). How to force action to be
executed in /lib directory?

Piotr Jachowicz

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