From: Schnyder Franz (fschnyder_at_[hidden])
Date: 2005-11-08 02:06:19
> What you want is CPP -> LST -> OBJ and C -> LST -> OBJ, correct? When
> compiling a C file with VxWorks, I'm assuming you don't need to "munch"
> it. If so, why don't you have C -> OBJ as normal, and
> CPP -> C -> OBJ
> ^^ munch here
> then you could do the munching in the vxworks.c++ action only. This
> would remove the need for an LST intermediary. Or am I missing something?
No not exactly, sorry I did explain ist very precise in my fist mail.
Here is what I need to do for VxWorks:
C and C++ files are compiled normal with 'CPP -> OBJ' and 'C -> OBJ'
When creating an "executable" (it's more an loadable module for the
taget than an exe) all the object files created from a C++ source file
must be munched. The munching needs all these Objects for one
executeable at ones and creates one C file.
This resulting C file can be compiled with normal 'C-> OBJ' and and must
be included to the files which are linked into the "executable".
The munching looks for all static objects and creates a function to call
all the constructors and destructors for these. This functions are
called during the loading and unloading of the "executable".
So I created the the composing list rule 'OBJ -> LST' which collects all
Objects and since muching doesn't care if there are also Objects from C
files in the list I just added all objects. Then created the munch rule
'LST -> C'. I compiled the resulting file and then linked all the
objects from the lst file and the additional object from the munching
into an "executable".
Therefore think ...
>>generators.register-composing vxworks.lst : OBJ STATIC_LIB : LST
>> : <toolset>vxworks ;
> this is: STATIC_LIB OBJ --> LST
> generators.register-composing vxworks.lst : LST : OBJ STATIC_LIB
> : <toolset>vxworks ;
> # LST --> STATIC_LIB OBJ
... I need 'STATIC_LIB OBJ --> LST' ?
>>generators.register-standard vxworks.munch : LST : C :
> <toolset>vxworks ;
> this is: LST --> C
> generators.register-standard vxworks.munch : LST : C :
> # C --> LST
... and I need 'LST --> C' or should I create the from the munching
resulting C in a different way.
Thanks for your help.
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