|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-19 08:39:52
Hi Syomichev,
> I added some "echo" statements in the install-target-class.construct in
> order to see what targets are "install" target's sources. With a
> following Jamfile
> lib dyn : dyn.cpp : <link>shared ;
> lib stat : stat.cpp dyn : <link>static ;
> install dist-dyn : dyn ;
> install dist-stat : stat ;
> alias install : dist-dyn dist-stat ;
> "bjam install" shows that the second install target is composed of two
> source targets (when I would logically expect only one).
> My debug printout is:
> dist-dyn
> dyn.dll
> ---------
> dist-stat
> stat.a
> dyn.dll
> ---------
> Actually, I have two questions:
> 1) How does "dyn.dll" get listed as a source target to the "dist-stat"
> install target?
This is the way generators work. The 'dyn' target produces dyn.lib and
dyn.dll. Whe 'stat' target consumes dyn.lib, but don't know what to do with
dyn.dll, so it returns it together with stat.a.
I have a patch that changes this behaviour and hope to commit it during this
week.
> 2) Why there is no "duplicate target" error raised? What is the
> mechanism of the duplicate elimination?
The "duplicate target" error is raised when you have two targets that are
assigned the same filename but differ either in the list of sources (which
never happened so far), or in the list of 'free' properties, which happens
quite often.
So,
exe a : a.cpp ;
exe b : a.cpp ;
generates no error, but
exe a : a.cpp : <define>FOO ;
exe b : a.cpp ;
generates an error.
HTH,
Volodya
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
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