From: Phillip Seaver (phil_at_[hidden])
Date: 2006-02-20 13:02:35
Reece Dunn wrote:
> Couldn't you do the following (pseudo-code):
> if $(name:ext) == $(target-name)
> name = $(name:S=) ;
> where name is the name of the target and target-name is lib, obj, xml, etc.
> That way, it will only strip the extension if you have something like:
> obj foo.obj : foo.cpp ;
That would only work on Windows, AFAIK.
> NOTE: some special logic will be needed for the lib target as you can have:
> lib Foo.Bar.lib : foo.cpp ;
> lib Foo.Bar2.dll : bar.cpp ;
> That would mean that my initial example will work without change and the new
> suffix-stripping logic will work as required. IMHO, that would be the best
> solution (even though it requires more logic)!
So, what you would want there would be for it to look at the default
extension for that target and not strip it off? Of course, that would
still not be very portable, since you'd have to have the extension name
differ for different platforms, which is one thing Jam was trying to
avoid in the first place. :-)
Volodya, would it be possible to somehow include the target type in the
target name to avoid most name clashes? Or would that break the code
that finds targets based on name?
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