Boost logo

Boost-Build :

From: muchacho_30 (aachkar_at_[hidden])
Date: 2005-01-05 20:32:26


Hello again!

>>I am writing a new generator for a new C compiler (ImageCraft)
which is
>>currently not supported by Boost-Build v2. I based it on gcc.jam
which
>>describes how to extend the toolset to support the GCC compiler.
>>Everything works well except for the following:
>>
>>1. The complier generates files that I would like to delete when
'bjam
>>clean' is invoked. For example, I can't make it clean up the file
>>'bqueue.lis' and I don't know where to invoke the common.Clean rule
>
>
> It's easy. If your compiler produces anything else besides OBJ, you
need to
> specify that when declaring generator.
>
>
>>generators.register-c-compiler icc.compile.c : C : OBJ
:
>><toolset>icc ;
>
>
> This should become:
>
> type.register LIS : lis ;
> generators.register-c-compiler icc.compile.c : C : OBJ LIS :
<toolset>icc ;
>
> V2 will clean "lis" file automatically.
>

The above works for files like LIS because they are always generated
by
the compiler, and, if they are missing, we need to re-compile.

I would like to do the same for error files, so I did the following:

type.register ERR : err ;
generators.register-c-compiler icc.compile.c : C : OBJ LIS ERR :
<toolset>icc ;

But, I run into problems because the behavior of error files is not
the
same:

1) if the compiler finds an error, it generates an error file, e.g.
myprog.err and does not generate an object file. This is ok, because
we
need to re-compile when the object file is missing.

2) if the compile works with no errors, then the compiler only
generates
myprog.o but NOT myprog.err (or it erases a previous myprog.err)

Now, if after a successful build, I run bjam again, it will try to
compile all the source files into object files, because the ERR files
are missing! (and they are specified as a dependency in the generator)

I need a way to specify files to be cleaned when 'bjam clean' is
invoked, but these files do not need to be generated if they are not
present.

How do I do that?
Can I use NOCARE or NOUPDATE (from the original Perforce Jam)?
and where do I place them?
Is there another way?

Thanks!
Alain.

 


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