Boost logo

Boost-Build :

Subject: Re: [Boost-build] Need help: generate rule error
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-29 17:25:01


AMDG

Алексей Бадяев wrote:
> Then I rework with using generate rule (proces sources by one at time):
> ----------------------------------------------------------------------
> rule generate-def ( project name : property-set : sources * )
> {
> local result ;
> local a = [ new non-scanning-action : def-init : $(property-set) ] ;
> result += [ new file-target $(name) $(name) : : $(project) : $(a) ] ;
> for local s in $(sources)
> {
> a = [ new non-scanning-action $(s) : def-proc : $(property-set)
> ] ;
> result += [ new file-target $(name) $(name) : : $(project) :
> $(a) ] ;
> }
> return $(result) ;
> }
> rule def-init ( target : sources * : properties * )
> {
> }
> actions def-init
> {
> echo EXPORTS > "$(<)"
> }
> rule def-proc ( target : sources * : properties * )
> {
> }
> actions def-proc
> {
> $(NM) "$(>)" | grep " T " | grep " _mylib_" | sed "s/^.* _//" >>"$(<)"
> }
> generate mylib.def
> : $(MYLIB_OBJ)
> : <generating-rule>@generate-def
> ;
> explicit mylib.def ;
>
> BUT this code not work: Boost Build report me about error (this is all
> output from bjam):
>
> *c:/devtools/libs/boost_1_38_0/tools/build/v2/kernel\modules.jam:103:
> in modules.call-in
> rule def-init unknown in module object(non-scanning-action)@1337.

Try using $(__name__).def-init inside generate-def

In Christ,
Steven Watanabe


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