|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-03-06 01:57:06
Hi Ali,
> I have an existing project that uses ".C" extension for C++ files.
>
> With "bjam --v2" I get
>
> boost/tools/build/new/generators.jam:715: in ensure-type from module
> generators
> error: target { hello.C. } has no type
Oops! The '.c' extension should be recognized for C files!
> I diagnosed, finding this line in "new/builtin.jam"
>
> type.register CPP : cpp cxx ;
>
> I would like to add in my Jamfile the extension "C", but
>
> type.register-suffixes
>
> doesn't work (because it is declared "local"?).
>
> What is the appropriate method for adding a suffix to a type (without
> modifying the base files)?
Answering your specific question, 'type.register-suffixes' is the right way.
It just should not be local. OTOH, imagine builtin.jam will contain:
type.register C : c ;
type.register CPP : cpp cxx ;
You'd need to *change* the type associated with specific suffix. Probably,
'register-suffixes' rule can take a third parameter, telling if it should
silently change types, instead of issuing an error.
- Volodya
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