Subject: Re: [Boost-build] Newbie question to make rule
From: Piotr Jachowicz (pjachowi_at_[hidden])
Date: 2010-06-18 17:16:06
> Message: 2
> Date: Thu, 17 Jun 2010 12:57:56 -0700
> From: Steven Watanabe <watanabesj_at_[hidden]>
> To: "Boost.Build developer's and user's list"
> Subject: Re: [Boost-build] Newbie question to make rule
> Message-ID: <4C1A7E44.3060301_at_[hidden]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Piotr Jachowicz wrote:
>> 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?
> What about:
> actions schemagen
> cd $(>:D)
> schemagen $(>:D=)
Thank you, it works perfectly fine.
Can I have subsequent question? Why bjam keep regenerating schema.cxx
even if schema.imp did not change? And how to stop it?
> In Christ,
> Steven Watanabe
-- Piotr Jachowicz
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