Boost logo

Boost-Build :

From: Andrei Melnikov (andy.melnikov_at_[hidden])
Date: 2006-08-16 16:17:38


On 16/08/06, Artem Alimarine <artem_at_[hidden]> wrote:
> Hi,
>
> As far as I understand, then the lib rule gets libraries in the source
> argument, it does not repack library sources into the new library.
>
> What is then the difference between
> lib biglib : smalllib1 smalllib2 ;
> and
> alias biglib : smalllib1 smalllib2 ;
> ?
>
> What the lib rule do with the library args?
>
I would call this a bug. Use the attachment to reproduce it.

project : default-build <link>static ;

lib smalllib1 : 1.cpp ;
lib smalllib2 : 2.cpp ;

lib biglib : smalllib1 smalllib2 ;
alias bigalias : smalllib1 smalllib2 ;

exe exefromlib : biglib ;
exe exefromalias : bigalias ;

This Jamroot file doesn't build at all. It says "warn: Unable to
construct ./biglib". But if you comment the "exefromlib" line,
"exefromalias.exe" will be built.

I also attached a Makefile to illustrate the desired behaviour:

ENTRYHACK = /MACHINE:X86 /SUBSYSTEM:CONSOLE

1.obj : 1.cpp
        cl /nologo /c 1.cpp

2.obj : 2.cpp
        cl /nologo /c 2.cpp

smalllib1.lib : 1.obj
        lib /nologo 1.obj /OUT:smalllib1.lib

smalllib2.lib : 2.obj
        lib /nologo 2.obj /OUT:smalllib2.lib

biglib.lib : smalllib1.lib smalllib2.lib
        lib /nologo smalllib1.lib smalllib2.lib /OUT:biglib.lib

exefromlib.exe: biglib.lib
        link /nologo biglib.lib /OUT:exefromlib.exe $(ENTRYHACK)

exefromalias.exe: smalllib1.lib smalllib2.lib
        link /nologo smalllib1.lib smalllib2.lib /OUT:exefromalias.exe $(ENTRYHACK)

all: exefromlib.exe exefromalias.exe

-- 
Andrei



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