Boost logo

Boost-Build :

From: Kirill Lapshin (kir_at_[hidden])
Date: 2006-03-05 15:22:30


Thanks a bunch for your help. <implicit-dependency> did the trick.

Just for the record, the way I solved my first problem (calling custom
script, using relative path, from actions) is:

in Jamroot:

path-constant SCRIPTS_DIR : scripts ;

import custom ;
custom.init $(SCRIPTS_DIR) ;

in custom.jam:

rule init ( scripts_dir )
     if $(.configured)
         errors.error "Attempt to reconfigure custom.jam" ;
     .configured = true ;

     .scripts_dir = $(scripts_dir) ;


actions some_action
     $(.scripts_dir)/some_script $(<) $(>)

Daniel Einspanjer wrote:
> I'm still new to BBv2, but I think I can help point you the right way on
> some of these questions:
> "Kirill Lapshin" <kir_at_[hidden]> wrote in message
> news:du58sm$jbl$
>> I thought ok, fine I'll use path-constant!
>> Problem -- I defined path-constant in Jamroot, but it is not visible in
>> verbatim.jam.
>> Fine, I'll hack my way for now and I moved all the code from
>> verbatim.jam to Jamroot. That one sort of fixed the problem, except that
>> build log looks a bit awkward (due to the fact that Jamroot's name
>> consists of full path to the file), but that's a hack anyways, no big
>> deal.
>> First question: what is the proper fix for this problem?
> I'm sorry, I don't have a ready answer. I know I've seen some testcases for
> handling path constants in the boost-build/test directory, but I don't have
> time tonight to dig them up. If you don't have an answer, I'll try to find
> it tomorrow.
> Just to make sure, you do know about making a rule with the same name as the
> action to do BB logic (preparing variables and such) before the action
> starts sending commands to the system, right?
>> Second question: will lib rule pick up dependency on generated.hpp and
>> realize that it has to regenerate it (if needed) before compiling
>> util.cpp?
> Just include this line to the requirements section of your lib util target.
> <implicit-dependency>generated.hpp
>> Third question: the whole setup currently does not work, because
>> generated.hpp gets created in build directory, but that said directory
>> is not added to includes when compiling util.cpp. What is the right way
>> to fix that?
> Implicit-dependency will fix that problem too.
> _______________________________________________
> Unsubscribe & other changes:

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