Hi Phillip,

Thanks for the answers! I made some remarks below. If you have the time, I'd like to hear your opinion.

Regards, Dirk

You should mention which version you're using.  That may change the 
answer to some questions.  :-)

  
I use bjam 1.14 from boost_1_34
Well, first off, it's not clear from your example why you're doing that 
instead of this:
  
That's my fault. The reasoin I would like to do this is that I want 2 libraries from the same source, but with a different define (please dont ask why). So the first thing I tried was

lib a : a.cpp : <define>X ;
lib b : a.cpp : <define>Y ;

This I cannot do, because bjam complains about have the same source (this is in the manual as well). So I went for

lib a : [ obj a :a.cpp ] : <define>X ;
lib b : [ obj b : a.cpp ] : <define>Y ;

But now the defines are not passed to the compiler (bjam -n show you this) - dont know why. If I use the form I posted, it works - but it is ugly since I have to repeat myself alot

So my question would be: how can I have something of the form, with more than one object:

lib a : [ obj a :a.cpp ] [ obj b :b.cpp ] : <define>X ;
lib b : [ obj a :a.cpp ] [ obj b :b.cpp ] : <define>Y ;

instead of having to do

lib a : [ obj a :a.cpp : <define>X ] [ obj b :b.cpp : <define>X ] ;
lib b : [ obj a :a.cpp : <define>Y ] [ obj b :b.cpp : <define>Y ] ;

It would behave the way you want that example to.  That aside, there are 
a couple of options for this (that I know of).  You can use a "project" 
target in that file like this:
  
Thanks for the suggestions! I like the local variable variant
  
*2) alias*

I have 2 targets that are 90% alike, the only difference is they link 
to 1 different library. Now I specify 2 targets which are basically 
copies. Is it possible to define a general target once and specialize 
it for the actual case:

exe base : main.cpp lib-general ;

alias exe-a  : base lib-a ;
alias exe-b  : base lib-b ;

At the moment base is compiled/linked, this fails because some of the 
symbols is in either lib_a or lib_b
    

I don't believe you can do that.  You should be able to do a library 
that contains all the common sources and use it, though.  I assume that 
the reason you want to do it like that is that there are more sources 
(or libs) and/or requirements that you don't want to repeat.

    lib exe-base : main.cpp lib-general ;
    exe exe-a : exe-base lib-a ;
    exe exe-b : exe-base lib-b ;


Another way you could do it:

    for local name in a b
    {
        exe exe-$(name) : main.cpp lib-general lib-$(name) ;
    }

  
  
Thanks! I will look into these suggestions.
    

With the version I have, you can, which is why I said you should tell us 
the version you're using.  The way you would do it, though, would be:
  
Sorry - I guess I just forgot. I believe I have the last version: Boost.Jam  Version 3.1.14. OS=NT.

But when I try <os>LINUX, I get a

error: "LINUX" is not a known value of feature <os>
error: legal values: "NT"

Should I get something from svn?
  
*4) stage rename*

I could'nt find this one:

stage deliver : exe_a : <location>a <rename>base ;

In other words, I'd like to give a name to an install target on 
installation.
    

I can't help you with "stage" -- I always use "install".  From my copy 
of stage.jam, it looks like you can use "<name>" to rename it when you 
use the "install" target.
  
Yep -- I saw that too, but when I tried it, something like

  stage sqlserver
    : the-exe-for-sqlserver
    : <location>$(ROOT)/var/tst/build-w-i386-sqlserver
    <install-dependencies>on
    <install-type>EXE
    <name>my-cool-exe
    ;

If have the same target 'my-cool-exe' (executable name - which is in the manual) for several different databases. I would like to have the buildprocess copying and renaming them properly, instead of a little script some developer has to run after compiling - we will forget & get confused.
Phillip
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

  

-- 
CodeShop BV
Wenckebachweg 150-B
1096 AB Amsterdam

www.code-shop.com
+31 6 411 92 024