Boost logo

Boost-Build :

From: Klaus Nowikow (e8827661_at_[hidden])
Date: 2006-07-07 09:21:03


I am trying to create a customized install rule - package.install
does not fit my needs. So I copied package.install and changed it
to what I need. The problem is that my rule does not work with
'explicit' - it is called every time I perform a build.
I got the nightly build of Boost.Build a couple of days ago, so I
already have the bugfix described in
http://thread.gmane.org/gmane.comp.lib.boost.build/11544/focus=11544

I have a minimal example showing the problem:

# file test.jam
import project ;
import stage ;
rule install ( name : root : requirements * )
{
        stage.install $(name)-root : $(root) : $(requirements) ;
        alias $(name) : $(name)-root ;
        local c = [ project.current ] ;
        local project-module = [ $(c).project-module ] ;
        module $(project-module)
        {
                explicit $(name)-root ;
        }
}
# EOF

# file Jamroot
import test ;
test.install installtest : [ exe hello : test.cpp ] ;
explicit installtest ;
# EOF

(test.txt is just an empty file)
bjam -n gives:

...found 11 targets...
...updating 7 targets...
MkDir1 bin

     mkdir "bin"

MkDir1 bin\gcc

     mkdir "bin\gcc"

MkDir1 bin\gcc\debug

     mkdir "bin\gcc\debug"

gcc.compile.c++ bin\gcc\debug\test.o

     "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -c -o "bin\gcc\debug\test.o" "test.cpp"

gcc.link bin\gcc\debug\installtest-root__hello.exe

     "g++" -o "bin\gcc\debug\installtest-root__hello.exe" -Wl,--start-group "bin\gcc\debug\test.o" -Wl,--end-group -g

MkDir1 installtest-root

     mkdir "installtest-root"

common.copy installtest-root\installtest-root__hello.exe

     copy "bin\gcc\debug\installtest-root__hello.exe" "installtest-root\installtest-root__hello.exe"

...updated 7 targets...

i.e., the "installtest" rule is called although not given in the command line.
Is there something I am doing wrong here?

--
Klaus

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