|
Boost-Build : |
Subject: [Boost-build] "install" rule strange behaviour
From: dimak (dvb.kharkov_at_[hidden])
Date: 2012-08-30 06:43:39
Hello guys,
I need your help to clarify the logic of work of "install" rule. My
observation is that in some cases execution of install causes targets to be
moved to installation directory, and in some cases they are copied.
For example of "copying" case, if we change example/hello/jamroot.jam to:
exe hello : hello.cpp ;
explicit hello ;
install inst : hello ;
and run "bjam", "hello" binary (my platform is Ubuntu) is linked into "bin"
directory and then is copied into "inst" directory. At terminal output we
see:
...found 10 targets...
...updating 7 targets...
common.mkdir inst
common.mkdir bin
common.mkdir bin/gcc-4.6.1
common.mkdir bin/gcc-4.6.1/debug
gcc.compile.c++ bin/gcc-4.6.1/debug/hello.o
gcc.link bin/gcc-4.6.1/debug/hello
common.copy inst/hello
...updated 7 targets...
For example of "moving" case, if we change example/libraries/app/jamfile.jam
to:
exe app : app.cpp /library-example/foo//bar ;
explicit app ;
install inst : app ;
and run "bjam", "app" binary is linked directly into "inst" directory and no
copy is performed. At terminal output we see:
...found 10 targets...
...updating 7 targets...
common.mkdir inst
common.mkdir bin
common.mkdir bin/gcc-4.6.1
common.mkdir bin/gcc-4.6.1/debug
gcc.compile.c++ bin/gcc-4.6.1/debug/app.o
gcc.link inst/app
I found out that behavior of "install" rule depends on presence of
dependency targets of "exe" target to be installed. To illustrate, edit the
same example/libraries/app/jamfile.jam to remove dependency on
/library-example/foo//bar:
exe app : app.cpp ;
explicit app ;
install inst : app ;
In this case we see "copying" scenario again:
...found 10 targets...
...updating 7 targets...
common.mkdir inst
common.mkdir bin
common.mkdir bin/gcc-4.6.1
common.mkdir bin/gcc-4.6.1/debug
gcc.compile.c++ bin/gcc-4.6.1/debug/app.o
gcc.link bin/gcc-4.6.1/debug/app
common.copy inst/app
...updated 7 targets...
Conclusion: "install" rule work depends on sourced targets characteristics.
Question 1: Is it correct?
Question 2: How to achieve always "copying" way of install rule working?
Thank you for your time,
Kind regards,
Dima Kinoshenko
-- View this message in context: http://boost.2283326.n4.nabble.com/install-rule-strange-behaviour-tp4634962.html Sent from the Boost - Build mailing list archive at Nabble.com.
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