[Boost.Build v2] Please help updating my build process from v1 (1.33.1) to v2 (1.34.1)
Hi all,
as most of my colleagues insist on using Visual Studio, I have made a
vcproj-wrapper around Boost.Build v1 for 1.33.1. The Jamfile looks
like this:
<Jamfile>
project-root ;
BOOST_LOCAL_STAGE_DIR ?= stage ;
rule Pseudo ( target : libname : kind : variant : name_prefix ? )
{
LIBNAME = $(libname) ;
LIBKIND = $(kind) ;
VARIANT = $(variant) ;
REALNAME = $(name_prefix)$(LIBNAME) ;
REALNAME ?= $(LIBNAME) ;
NOTFILE $(target) ;
DEPENDS $(target) : $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT) ;
stage $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT)
:
<$(LIBKIND)>@boost/libs/$(LIBNAME)/build/boost_$(REALNAME)
:
<sysinclude>../../../boost
<debug-symbols>on
<debug-store>database
<runtime-build>$(VARIANT)
<runtime-link>dynamic
Ames, Andreas (Andreas) wrote:
Hi all,
as most of my colleagues insist on using Visual Studio, I have made a vcproj-wrapper around Boost.Build v1 for 1.33.1. The Jamfile looks like this:
<Jamfile> project-root ;
In V2, this is not necessary.
BOOST_LOCAL_STAGE_DIR ?= stage ;
Is this an environment var? Please read: http://boost.org/boost-build2/doc/html/bbv2/faq/envar.html
rule Pseudo ( target : libname : kind : variant : name_prefix ? ) { LIBNAME = $(libname) ; LIBKIND = $(kind) ; VARIANT = $(variant) ; REALNAME = $(name_prefix)$(LIBNAME) ; REALNAME ?= $(LIBNAME) ; NOTFILE $(target) ; DEPENDS $(target) : $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT) ; stage $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT) : <$(LIBKIND)>@boost/libs/$(LIBNAME)/build/boost_$(REALNAME)
You'd have to adjust this, too. To link to static version of some build library you'd use /path-to-boost//some-library/<link>static and for shared link use "<link>shared".
: <sysinclude>../../../boost
Use 'include'.
<debug-symbols>on <debug-store>database <runtime-build>$(VARIANT) <runtime-link>dynamic
on : $(VARIANT) ; } Pseudo signals_lib_debug : signals : lib : debug ;
Pseudo signals_lib_release : signals : lib : release ; </Jamfile>
Furthermore I've created a Jamrules and a boost-build.jam like follows:
<Jamrules> project boost : ../../../boost ; </Jamrules>
boost-build ../../../boost/tools/build/v1 ; From my vcproj-files I can then just invoke bjam with the appropriate target and TOOLS-spec.
1) Unfortunately this doesn't work any longer with Boost.Build v2. After changing boost-build.jam in the obvious way, I just get bjam to display:
error: Could not find parent for project at '.' error: Did not find Jamfile or project-root.jam in any parent directory.
although the Jamfile is definitely there. The same thing happens, when I change the name to Jamfile.v2.
The top-level directory must have a file called 'Jamroot', as opposed to 'Jamfile'. Are you sure it's there?
2) Skimming over the docs, I don't see Jamrules (which was previously needed) mentioned. Is it still necessary?
No. In V1, top-level dir had to have Jamfile+Jamrules. In V2, top-level dir should have Jamroot.
3) Finally, the build wrapper needs to be selfcontained (we get it from our repository), so site-config.jam and user-config.jam must not be mandatory. I just wonder, where to specify my 'using' rule(s) (like 'using msvc : 8.0 ;').
In your Jamroot. - Volodya
Hi, thanks Volodya, that actually gets me a step further. Unfortunately I'm still not there yet ;-), see below.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Monday, July 30, 2007 12:57 PM Subject: Re: [Boost-users] [Boost.Build v2] Please help updating my buildprocess from v1 (1.33.1) to v2 (1.34.1)
Ames, Andreas (Andreas) wrote:
BOOST_LOCAL_STAGE_DIR ?= stage ;
Is this an environment var? Please read:
No, not an environment variable, it is set on the command line using '-s' option. Is this still supported in v2?
No. In V1, top-level dir had to have Jamfile+Jamrules. In V2, top-level dir should have Jamroot.
Ok, so I've replaced Jamfile+Jamrules with the following files:
Ames, Andreas (Andreas) wrote:
Hi,
thanks Volodya, that actually gets me a step further.
Unfortunately I'm still not there yet ;-), see below.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Monday, July 30, 2007 12:57 PM Subject: Re: [Boost-users] [Boost.Build v2] Please help updating my buildprocess from v1 (1.33.1) to v2 (1.34.1)
Ames, Andreas (Andreas) wrote:
BOOST_LOCAL_STAGE_DIR ?= stage ;
Is this an environment var? Please read:
No, not an environment variable, it is set on the command line using '-s' option. Is this still supported in v2?
It's considered
No. In V1, top-level dir had to have Jamfile+Jamrules. In V2, top-level dir should have Jamroot.
Ok, so I've replaced Jamfile+Jamrules with the following files:
boost-build ../../../boost/tools/build/v2 ; <Jamroot> using msvc : 8.0 ; BOOST_LOCAL_STAGE_DIR ?= stage ;
rule Pseudo ( target : libname : libtype : variant ) { VARIANT = $(variant) ; NOTFILE $(target) ; DEPENDS $(target) : $(BOOST_LOCAL_STAGE_DIR)/$(libtype)/$(libname)/$(variant) ; stage $(BOOST_LOCAL_STAGE_DIR)/$(libtype)/$(libname)/$(variant)
Uh, oh. I did not even notice you're using those low-level tricks. I'd suggest using: stage $(target) : <sources> : <location>$(BOOST_LOCAL_STAGE_DIR)/$(libtype)/$(libname)/$(variant) ........... and removing NOTFILE and DEPENDS completely. - Volodya
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Monday, July 30, 2007 5:16 PM Subject: Re: [Boost-users] [Boost.Build v2] Please help updating mybuildprocess from v1 (1.33.1) to v2 (1.34.1)
Ames, Andreas (Andreas) wrote:
Uh, oh. I did not even notice you're using those low-level tricks. I'd suggest using:
stage $(target) : <sources> : <location>$(BOOST_LOCAL_STAGE_DIR)/$(libtype)/$(libname)/$(variant) ...........
and removing NOTFILE and DEPENDS completely.
I'm actually so dense (at least regarding Boost.Build) that I didn't even realise that those were low-level tricks ;-). Now it works and is much cleaner than before. Thanks a heap, Volodya. cheers, aa -- Andreas Ames | Programmer | Comergo GmbH | ames AT avaya DOT com Sitz der Gesellschaft: Stuttgart Registergericht: Amtsgericht Stuttgart - HRB 22107 Geschäftsführer: Andreas von Meyer zu Knonow, Udo Bühler, Thomas Kreikemeier
participants (2)
-
Ames, Andreas (Andreas)
-
Vladimir Prus