|
Boost-Build : |
Subject: Re: [Boost-build] selecting the assembler
From: Bruno Santos (bsantos_at_[hidden])
Date: 2012-03-06 08:53:11
On 06/03/2012, at 11:46, Oliver Kowalke wrote:
> Am 05.03.2012 18:44, schrieb Bruno Santos:
>> Of the top of my head you have two options:
>>
>> 1- Use the *make* rule:
>>
>> make target : source : @masm ;
>>
>> actions masm
>> {
>> masm "$(>)" -o "$(<)"
>> }
>
> make asm/fcontext_i386_ms_pe_masm.asm : asm/fcontext_i386_ms_pe_masm.o : @masm
> actions masm
> {
> ml.exe "$(>)" -o "$(<)"
> }
>
> does not find the the assembler file which is in src/asm/fontext_...
>
> probably this would be the preferred method to compile different assembler files for different platforms.
> unfortunately I'm not familiar with boost.build and reading the build docu did not help much how do I incorporate the make rule within the alternative selection:
>
> alias asm_sources
> : asm/abc.asm
> : <toolset>gcc
> <target-os>windows
> ;
>
> alias asm_sources
> : asm/xyz.asm
> :;
>
> explicit asm_sources ;
>
> lib boost_klm
> : asm_sources
> : <link>...
> ;
>
> could I get a hint?
>
> Oliver
>
>>
>> 2 - override the toolset
>>
>> import generators;
>>
>> generators.override this-module.compile.asm : gcc.compile.asm ;
>>
>> actions compile.asm
>> {
>> masm "$(>)" -o "$(<)"
>> }
> does not work for me - I still see: g++ -x assembler-with-cpp -O0 ...
> which calls gas on the MASM assembler file - it seams that the specialized actions compile.asm is not called
>
You have to put it on a module, example:
#BEGIN OF masm.jam
import generators ;
generators.override masm.compile.asm : gcc.compile.asm ;
actions compile.asm
{
ml "$(>)" -o "$(<)"
}
#END OF masm.jam
then at your Jamroot/Jamfile add:
import masm ;
masm.jam must be next to your project Jamroot
Cheers
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