Boost logo

Boost-Build :

Subject: Re: [Boost-build] always exec a make rule
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2011-02-02 02:28:46


Boris Schaeling wrote:
> On Tue, 01 Feb 2011 21:56:43 +0100, Oliver Kowalke <oliver.kowalke_at_[hidden]>
>wrote:
>
> > Am 01.02.2011 21:40, schrieb Gevorg Voskanyan:
> >> Oliver Kowalke wrote:
> >>> a Jamfile cotnains a make rule
> >>>
> >>> ...
> >>> make xyz.hpp
> >>> : xyz_header
> >>> : @copy-xyz_header
> >>>
> >>> how can I achieve that the make rule will always executed before
> >>>
> >>> test-suite "xyz" :
> >>> [ run test_xyz.cpp ]
> >>> ;
> >>>
> >>> ?
> >>> I didn't found a solution in the build docu (I assume that 'xyz.hpp' must
>be
> >>> made as dependecy for test-suite 'xyz').
> >>>
> >>> regards,
> >>> Oliver
> >>
> >> test-suite "xyz" :
> >> [ run test_xyz.cpp ]
> >> :<dependency>xyz.hpp
> >> ;
> >
> > test_xyz.cpp is compiled before 'make xyz.hpp' is executed
>
> As that's the signature from testing.jam:
>
> rule run ( sources + : args * : input-files * : requirements * : target-name ?
>: default-build * )
>
> maybe this works
>
> make xyz.hpp : xyz_header : @copy-xyz_header ;
> run test_xyz.cpp : : : <dependency>xyz.hpp : test_xyz ;
> test-suite xyz : test_xyz ;
>
> ?
>
> Boris

Yes. Or you could still have it inline like this:

test-suite "xyz" :
      [ run test_xyz.cpp : : : <dependency>xyz.hpp ]
      ;

Gevorg


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