Boost logo

Boost-Build :

Subject: Re: [Boost-build] staging subprojects
From: Jim Gallagher (jim_at_[hidden])
Date: 2009-09-30 10:38:58


Johan,

Sorry, took some short cuts to assemble a quick reply, and made a mess.

OK, a stripped down project:

Jamroot:

import os ;
import feature ;
import type ;

path-constant TOP : . ;

using msvc : : :
    <compileflags>-DWIN32
    <compileflags>-D_CRT_SECURE_NO_WARNINGS
    <compileflags>-D_SECURE_SCL=0
    <compileflags>-I\"C:/Program\ Files/Microsoft\ Visual\ Studio\
8/VC/PlatformSDK/Include\"
    <compileflags>-I\"C:/Program\ Files/Microsoft\ Platform\ SDK/Include\"
    <compileflags>-Wp64
    <compileflags>/Z7
    <linkflags>-libpath:\"C:/Program\ Files/Microsoft\ Visual\ Studio\
8/VC/PlatformSDK/Lib\"
    <linkflags>-libpath:\"C:/Program\ Files/Microsoft\ Platform\ SDK/lib\"
    <linkflags>msvcrt.lib
    <linkflags>msvcprt.lib
    <linkflags>kernel32.lib
    <linkflags>oldnames.lib
    <linkflags>/MACHINE:X86
;

variant Debug32 :
        <threading>multi
        <exception-handling>on
        <asynch-exceptions>off
        <extern-c-nothrow>on
        <warnings>on
        <debug-symbols>on
        <optimization>off
        <runtime-debugging>off
        <runtime-link>shared
        <link>shared
        <address-model>32
        <rtti>on
;

project TEST
;

# find all the jam subprojects
JamProjects =
    [ MATCH (.*)/Jamfile : [ glob-tree Jamfile ] ]
    ;

#build-project $(JamProjects) ;
for local proj in $(JamProjects)
{
    build-project $(proj) ;
}

alias sub-stages : $(JamProjects)//stage ;

install stage
    :
    sub-stages
    ;
===========================
sub/Jamfile:

lib a :
    a.c
;

lib b :
    b.c
;

lib c :
    c.c
;

install stage-client
    : a c
    : <location>$(TOP)/stage/client
;

install stage-server
    : b c
    : <location>$(TOP)/stage/server
;

explicit stage stage-client stage-server ;
alias stage : stage-client stage-server ;

==================================
Complete output from "bjam Debug32 stage" at the root, then "bjam Debug32
stage" in sub:

C:\TEMP>bjam Debug32 stage
M:/ul081b_bp8.0_integrated_test_20090928_view/ba3/boost-build/build\virtual-target.jam:996:
in virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target: <pstage>c.dll
error: previous virtual target { common%common.copy-c.dll.SHARED_LIB {
common%common.copy-c.dll.SHARED_LIB { msvc%msvc.link.dll-c.dll.SHARED_LIB {
msvc%msvc.compile.c-c.obj.OBJ { c.c.C } } } } }
error: created from ./stage
error: another virtual target { common%common.copy-c.dll.SHARED_LIB {
common%common.copy-c.dll.SHARED_LIB { msvc%msvc.link.dll-c.dll.SHARED_LIB {
msvc%msvc.compile.c-c.obj.OBJ { c.c.C } } } } }
error: created from ./stage
error: added properties: none
error: removed properties: none
M:/ul081b_bp8.0_integrated_test_20090928_view/ba3/boost-build/build\virtual-target.jam:459:
in actualize-no-scanner from module object(file-target)@144
M:/ul081b_bp8.0_integrated_test_20090928_view/ba3/boost-build/build\virtual-target.jam:111:
in object(file-target)@144.actualize from module object(file-target)@144
M:/ul081b_bp8.0_integrated_test_20090928_view/ba3/boost-build\build-system.jam:488:
in load from module build-system
M:\ul081b_bp8.0_integrated_test_20090928_view\ba3\devutils\..\boost-build\kernel\modules.jam:261:
in import from module modules
M:\ul081b_bp8.0_integrated_test_20090928_view\ba3\devutils\..\boost-build\kernel\bootstrap.jam:132:
in boost-build from module
M:\ul081b_bp8.0_integrated_test_20090928_view\ba3\devutils\..\boost-build\boost-build.jam:1:
in module scope from module

C:\TEMP>cd sub

C:\TEMP\sub>bjam Debug32 stage
...found 33 targets...
...updating 23 targets...
MkDir1 C:\TEMP\stage
MkDir1 C:\TEMP\stage\server
MkDir1 bin
MkDir1 bin\msvc-8.0
MkDir1 bin\msvc-8.0\Debug32
compile-c-c++ bin\msvc-8.0\Debug32\b.obj
b.c
msvc.link.dll bin\msvc-8.0\Debug32\b.dll
   Creating library bin\msvc-8.0\Debug32\b.lib and object
bin\msvc-8.0\Debug32\b.exp
common.copy C:\TEMP\stage\server\b.dll
        1 file(s) copied.
common.copy C:\TEMP\stage\server\b.lib
        1 file(s) copied.
compile-c-c++ bin\msvc-8.0\Debug32\c.obj
c.c
msvc.link.dll bin\msvc-8.0\Debug32\c.dll
   Creating library bin\msvc-8.0\Debug32\c.lib and object
bin\msvc-8.0\Debug32\c.exp
common.copy C:\TEMP\stage\server\c.dll
        1 file(s) copied.
common.copy C:\TEMP\stage\server\c.lib
        1 file(s) copied.
MkDir1 C:\TEMP\stage\client
compile-c-c++ bin\msvc-8.0\Debug32\a.obj
a.c
msvc.link.dll bin\msvc-8.0\Debug32\a.dll
   Creating library bin\msvc-8.0\Debug32\a.lib and object
bin\msvc-8.0\Debug32\a.exp
common.copy C:\TEMP\stage\client\a.dll
        1 file(s) copied.
common.copy C:\TEMP\stage\client\a.lib
        1 file(s) copied.
common.copy C:\TEMP\stage\client\c.dll
        1 file(s) copied.
common.copy C:\TEMP\stage\client\c.lib
        1 file(s) copied.
...updated 23 targets...

C:\TEMP\sub>

Thanks,
Jim



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