Boost logo

Boost :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-02-14 19:35:22


[2003-02-14] Aleksey Chernoraenko wrote:

>Rene Rivera wrote:
>>>Hi Doug,
>>>
>>>Sorry, I forgot about these dependencies. Actually we are using the
>makefile
>>>where BOOST_SIGNALS_STATIC_LINK is defined.
>>>There is another related issue. We would like to have automatic library
>>>selection feature. This hides the details about which DLL to link to from
>>>the users (regex library does the same thing). For this reason we made
>>>header file and a few changes to include it. This header defines the
>naming
>>>scheme based on compiler options and contains the lib specifier (#pragma
>>>comment) that allows to pass the library name to the linker.
>>>
>>>Unfortunately, I don't know bjam well to build the libraries and DLLs
>which
>>>file names will correspond to chosen naming scheme.
>>>By the way the regex's Jamfile cannot produce the files corresponding to
>>>it's naming scheme. Maybe it is impossible in bjam system?
>
>>Nothing is impossible ;-)
>
>
>It great that bjam can do anything I will look at it more carefully.
>Anyway I am sending the header file, changes and makefile.

Well, I didn't say bjam can do anything. I would love it if printed out
money ;-)

Here's a Jamfile for the signals library that does what the makefile you
posted does, and slightly more as it also works for other compilers other
than msvc.

The only change is the addition of the "stage bin-stage..." portion. There
are some differences in the output from the arrangement, and compsition of
the name of the files. The stage declaration tags this in alphabetical order
so the names wont match what your header is expecting. I use alpha ordering
because it's a more stable arrangement that doesn't change from library to
library. But you could easily change the header to handle this difference
;-\

Here's the script with the resulting list of libraries it generates on my
system, RH73-Linux, with gcc and gcc-3.2, and stlport 4.5.3...

----begin BOOST_ROOT/libs/signals/build/Jamfile----
# (C) Copyright Douglas Gregor 2001-2.
# Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice
appears
# in all copies. This software is provided "as is" without express or
implied
# warranty, and with no claim as to its suitability for any purpose.
#
# Boost.Signals build and test Jamfile

# declare the location of this subproject relative to the root
subproject libs/signals/build ;

# Base names of the source files for libboost_signals
CPP_SOURCES =
    trackable connection signal_base slot ;

dll boost_signals : ../src/$(CPP_SOURCES).cpp
    : <sysinclude>$(BOOST_ROOT)
    : debug release
    ;

lib boost_signals : ../src/$(CPP_SOURCES).cpp
    : <sysinclude>$(BOOST_ROOT) <define>BOOST_SIGNALS_STATIC_LINK
    : debug release
    ;

stage bin-stage
    :
        <dll>boost_signals
        <lib>boost_signals
    :
        # tags for the various toolsets
        <tag><msvc>_vc6_
        <tag><vc7>_vc7_
        <tag><borland>_bcb5_
        <tag><msvc-stlport>_vc6-stlport_
        <tag><gcc>_gcc_
        <tag><gcc-3.2>_gcc32_
        <tag><gcc-3.2-stlport-4.5.3>_gcc32-stlport_
        # tags for specific variants, in order of placement
        # (i.e. alphabetical)
        <tag><debug>d
        <tag><runtime-build>d
        <tag><runtime-link-static>s
        <tag><runtime-link-dynamic>d
        <tag><shared-linkable-false>s
        <tag><shared-linkable-true>i
        <tag><threading-single>s
        <tag><threading-multi>m
    :
        debug
        release
        <runtime-link>dynamic/static
        <threading>single/multi
    ;
---end---

Running:
 bjam -sTOOLS="gcc gcc-3.2 gcc-3.2-stlport-4.5.3"

Generates:
 bin-stage/
 libboost_signals_gcc32_ddim.so
 libboost_signals_gcc32_ddim.so.1.30.0
 libboost_signals_gcc32_ddis.so
 libboost_signals_gcc32_ddis.so.1.30.0
 libboost_signals_gcc32_ddm.a
 libboost_signals_gcc32_dds.a
 libboost_signals_gcc32_dim.so
 libboost_signals_gcc32_dim.so.1.30.0
 libboost_signals_gcc32_dis.so
 libboost_signals_gcc32_dis.so.1.30.0
 libboost_signals_gcc32_dm.a
 libboost_signals_gcc32_ds.a
 libboost_signals_gcc32_dsim.so
 libboost_signals_gcc32_dsim.so.1.30.0
 libboost_signals_gcc32_dsis.so
 libboost_signals_gcc32_dsis.so.1.30.0
 libboost_signals_gcc32_dsm.a
 libboost_signals_gcc32_dss.a
 libboost_signals_gcc32_sim.so
 libboost_signals_gcc32_sim.so.1.30.0
 libboost_signals_gcc32_sis.so
 libboost_signals_gcc32_sis.so.1.30.0
 libboost_signals_gcc32_sm.a
 libboost_signals_gcc32_ss.a
 libboost_signals_gcc32-stlport_ddim.so
 libboost_signals_gcc32-stlport_ddim.so.1.30.0
 libboost_signals_gcc32-stlport_ddis.so
 libboost_signals_gcc32-stlport_ddis.so.1.30.0
 libboost_signals_gcc32-stlport_ddm.a
 libboost_signals_gcc32-stlport_dds.a
 libboost_signals_gcc32-stlport_dim.so
 libboost_signals_gcc32-stlport_dim.so.1.30.0
 libboost_signals_gcc32-stlport_dis.so
 libboost_signals_gcc32-stlport_dis.so.1.30.0
 libboost_signals_gcc32-stlport_dm.a
 libboost_signals_gcc32-stlport_ds.a
 libboost_signals_gcc32-stlport_dsim.so
 libboost_signals_gcc32-stlport_dsim.so.1.30.0
 libboost_signals_gcc32-stlport_dsis.so
 libboost_signals_gcc32-stlport_dsis.so.1.30.0
 libboost_signals_gcc32-stlport_dsm.a
 libboost_signals_gcc32-stlport_dss.a
 libboost_signals_gcc32-stlport_sim.so
 libboost_signals_gcc32-stlport_sim.so.1.30.0
 libboost_signals_gcc32-stlport_sis.so
 libboost_signals_gcc32-stlport_sis.so.1.30.0
 libboost_signals_gcc32-stlport_sm.a
 libboost_signals_gcc32-stlport_ss.a
 libboost_signals_gcc_ddim.so
 libboost_signals_gcc_ddim.so.1.30.0
 libboost_signals_gcc_ddis.so
 libboost_signals_gcc_ddis.so.1.30.0
 libboost_signals_gcc_ddm.a
 libboost_signals_gcc_dds.a
 libboost_signals_gcc_dim.so
 libboost_signals_gcc_dim.so.1.30.0
 libboost_signals_gcc_dis.so
 libboost_signals_gcc_dis.so.1.30.0
 libboost_signals_gcc_dm.a
 libboost_signals_gcc_ds.a
 libboost_signals_gcc_dsim.so
 libboost_signals_gcc_dsim.so.1.30.0
 libboost_signals_gcc_dsis.so
 libboost_signals_gcc_dsis.so.1.30.0
 libboost_signals_gcc_dsm.a
 libboost_signals_gcc_dss.a
 libboost_signals_gcc_sim.so
 libboost_signals_gcc_sim.so.1.30.0
 libboost_signals_gcc_sis.so
 libboost_signals_gcc_sis.so.1.30.0
 libboost_signals_gcc_sm.a
 libboost_signals_gcc_ss.a

-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk