Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-06-21 15:05:03


[2002-06-21] op_jared_oberhaus wrote:

>Thanks, this is super useful! I wasn't doing bjam, I was doing jam.
>
>So, now I have everything set up as such:
>
>- I put allyourbase.jam, boost-base.jam, etc. in my tools/build
>directory.
ok.

>- Set BOOST_BUILD_PATH to that directory
ok. Also possible to implicitly set this. Look at boost-build.jam at the
root directory of the Boost distribution as an example.

>- Set TOP to my top directory, so $TOP/tools/build is the same as
>$BOOST_BUILD_PATH
don't think that's needed.

>- Downloaded jam.zip from sourceforge, renamed the jam.exe inside to
>bjam.exe. They are the same, right?
No, or at least I don't think so. Go to this page...

http://www.boost.org/tools/build/index.html
Building Boost Libraries

Near the bottom there are links for various prebuilt bjam's.
You want this link:

http://boost.sourceforge.net/jam-executables/bin.ntx86/bjam.zip
Microsoft Windows

>- set TOOLS=msvc (I have Visual Studio .NET)
>- set BUILD=debug
ok. Also possible is using the commandline args "-sTOOLS=msvc -sBUILD=debug"

>Now I still can't do what I want to do, and here are my two jamfiles
>to demonstrate the problem:
>
>-----$TOP/src/testlib1/Jamfile:
>
>SubDir TOP src testlib1 ;
That's a Perforce-Jam call. Use "subproject src/testlib1 ;" instead.

># Build testlib1
>
>CPP_SOURCES =
> Library1
> ;
>
>lib mytestlib1
> : $(CPP_SOURCES).cpp
> : <include>$(TOP)$(SLASH)src
You can use relative paths, try "<include>src" instead.

> <threading>multi
> : debug release <runtime-link>static/dynamic
>;
>
>-----$TOP/src/testlib2/Jamfile:
>SubDir TOP src testlib2 ;
Use "subproject src/testlib2 ;"

># Build testlib2 library
>
>dll mytestlib2
> : <lib>../testlib1/mytestlib1
> : <include>$(TOP)$(SLASH)src
Same as above :-)

> <threading>multi
> : debug release <runtime-link>static/dynamic
> ;
>
>---------------
>
>Now I cd into testlib1, "bjam", and it all works and makes a bunch
>of stuff under directory "bin".
>
>The I cd into testlib2, "bjam", and here's what it gives me:

[snip]

>I'm not sure what this means, but how can it not know the target
>type? It's just lib!
>
>And here's where I'm stuck. I guess I'm going back to Visual Studio
>for now. But I really want this to work, and I want to run these
>makefiles on Unix/Windows (I'm just starting on Windows).

I feel you pain ;-)

I think your almost there... the one thing I think your missing is to set up
you project root correctly. I think so because you haven't mentioned
anything about you top level directory so far.

You need to have a root to your project and all targets must be someplace
within that root. This is limitation of the way Boost.Build is currently
written, and we'll be improving on that on V2.

But for now you need to have a top level Jamfile that directs the other
subprojects. From your test it looks like you'll need this:

-----<your TOP dir>/Jamfile
project-root ;
-----------------

And that should be it, cross fingers :-\

>Thanks anyone for any help!

[snip]
No need to copy the complete reply next time ;-)

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

 


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