Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-08-08 02:41:12

   Hi Phil.

> I thought I had seen it documented somewhere exactly when and how
> virtual targets are created and the calls that are made to generators,
> etc., but I haven't been able to find it or figure it out yet.

   As I recall you have Boost Build targets who get their 'generate'
rule called to construct virtual targets for them. Those virtual targets
then get their actualize rule called to prepare Boost Jam actions for
executing the actual build procedure.

   Most target classes are derived from a basic-target class which does
some centralized logic in its generate rule applicable to all the
derived classes. That's why classes derived from it do not override the
'generate' rule but use a new 'construct' called from basic-target.generate.

   Another special kind of target class (derived from basic-target) is a
typed_target class that has the logic for automatically converting
targets between diffent types as needed using generator objects
(implemented in its construct rule). E.g. you specify that you want to
build an .exe from a .cpp then the .exe is modeled using a typed target
whose construct rule realizes that .cpp represents a typed target as
well and looks for an appropriate generator chain, which finds two
generators: .cpp --> .obj & .obj --> exe.

   I am not sure right now what the main generator rule for actually
doing its work is but it gets called from typed_target.construct. Most
likely also construct, generate or something like that (too lazy to
check at the moment :-)).

   All this should be implemented in build/targets.jam &

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

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