Boost logo

Boost-Build :

From: Felix E. Klee (felix.klee.jamboost_at_[hidden])
Date: 2003-01-22 16:25:44


On Wednesday 22 January 2003 07:46 am, Vladimir Prus wrote:
> The mechanism today is:
> 1. When Boost.Build tries to understand the type of a target, it looks
> through a list of several suffixes. For example, both "cpp" and "cxx" might
> be allowed. 2. When a target of certain type is created, one one suffix is
> used.
>
> I'm not sure that it's reasonable to change suffix depending on tool that
> generates file. IOW, if headers are produces by two tools, I don't think
> it's reasonable to have "h" suffix for one tool and "hpp" for another.

Agreed.

> >>Or would it be better
> >>to say that UIC generates *target* types CPP and H and use default
> >>extension for that type.
> >
> > And what are those default extensions? If they are customizable then I'm
> > fine with that solution.
>
> They were not customizable until 5 mins ago. But now:
> 1. Edit new/user-config.jam or create new file "user-config.jam" in your
> home dir

I put it in project-root.jam. Actually, that makes more sense since file
extensions usually are project dependent. BTW, I think that creating a file
called $HOME/user-config.jam will be repelling for the average UNIX user.
Something like "$HOME/.boost-build/user-config.jam" would be more natural.

> 2. Add
>
> import type ;
> type.change-generated-target-suffix H : : hpp ;
>
> After that, UIC will generate header with the "hpp" extension.
>
> Actually, it's possible to change extension for uic only:
>
> type.change-generated-target-suffix UIC_H : : hpp ;
>
> Is that sufficient?

Definitely, AFAICS it provides everything that is needed and is easy to use.

Felix

-- 
To contact me personally don't reply but send email to 
felix DOT klee AT inka DOT de
 

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