Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-11-02 23:39:09


[2002-11-02] Vaclav Slavik wrote:

>Hi,
>
>I'm experiencing a strange problem with bjam 3.1.2 (from Boost 1.29.0,
>on Linux): an action associated with my own rule is executed twice
>instead of once. Here's a sample file that shows it (it is a
>simplified one that does not use Boost.Build rules and can be used
>with ordinary Jam/MR):
>-------Jamfile-------
>rule IDLHeader
>{
> Depends first : $(<) ; # so that we always have them
> Depends $(<) : $(>) ;
> Clean clean : $(<) ;
> MakeLocate $(<) : $(LOCATE_SOURCE) ;
> SEARCH on $(>) = $(SEARCH_SOURCE) ;
>}
>actions IDLHeader
>{
> upf-idl2any -Lcxx -Iidl -o$(<:) $(>)
>}
>IDLHeader foo.h : foo.idl ;
>--------------
>This is bjam's output:
> [vasek_at_wintermute code]$ bjam
> ...found 10 targets...
> ...updating 1 target...
> IDLHeader foo.h
> IDLHeader foo.h
> ...updated 1 target...
> [vasek_at_wintermute code]$
>
>If I run bjam as "jam" or use FTJam, the target is only updated once.
>I'm probably missing something about Boost.Build, but I don't know
>what :( Any idea what am I doing wrong?

Yes :-) In Boost.Build V1 we load Jamfiles twice: once to "declare" targets
in the file, second to "generate" build instructions for the targets.

We test the variable "gIN_LIB_INCLUDE" to tell if it's the first "pass" or
not.

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]

 


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