From: muchacho_30 (aachkar_at_[hidden])
Date: 2005-01-05 20:32:26
>>I am writing a new generator for a new C compiler (ImageCraft)
>>currently not supported by Boost-Build v2. I based it on gcc.jam
>>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
>>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
> specify that when declaring generator.
>>generators.register-c-compiler icc.compile.c : C : OBJ
> This should become:
> type.register LIS : lis ;
> generators.register-c-compiler icc.compile.c : C : OBJ LIS :
> V2 will clean "lis" file automatically.
The above works for files like LIS because they are always generated
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 :
But, I run into problems because the behavior of error files is not
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
need to re-compile when the object file is missing.
2) if the compile works with no errors, then the compiler only
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
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?
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