Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-05-01 02:14:29


On Monday 30 April 2007 23:38, DrAnonymous wrote:
> Vladimir -
>
> What would be the proper way to make this compile from the top directory? I
> believe I can add bhome as a default include path to all subprojects, but I
> don't know the syntax.

Please check "project requirements". The example at the end of

        http://boost.org/boost-build2/doc/html/bbv2/tutorial/properties.html

should be close to what you want.
        
> I'm still confused as to why I can't build from the top dir, when bhome is
> properly included in the sub-project's Jamfile?

Have you tried to look at issued commands, using "bjam -n"? given that

        $bhome

has no meaning to bjam:

        - $var is not a variable access syntax in bjam, and
        - bhome is not a variable anyway

Boost.Build assumes '$bhome' is a name of directory. When you build in
subdir, compiler command includes

        -I $bhome

and the particular shell you use expands $bhome. When you build in top-level,
Boost.Build assumes that $bhome is the path relative to Jamfile where it
occurs, so compiler command has:

        -I subdir/$bhome

which is likely to be wrong.

HTH,
Volodya

>
> Thanks,
> Aaron R>
>
> On 4/30/07, Vladimir Prus <ghost_at_[hidden]> wrote:
> >
> > DrAnonymous wrote:
> >
> > > Phillip -
> > >
> > > Thanks for the feedback. If I remove the <include> from the Jamfile,
> > the
> > > compile won't work, no matter where I am.
> > >
> > > Would I use the bhome entry you mentioned in the jamroot or the Jamfile?
> > >
> > > Thanks,
> > > Aaron R>
> > >
> > >
> > >
> > > On 4/30/07, Phillip Seaver <phil_at_[hidden]> wrote:
> > >>
> > >> DrAnonymous wrote, on 4/30/2007 11:52 AM:
> > >> > jamfile
> > >> > exe atrans : atrans.cpp : <include>$bhome ;
> > >> >
> > >> > When I am in subdir and do a bjam, I get an executable under the bin
> > >> > directory. If I try to do a bjam under the top directory, the
> > include
> > >> > files aren't found. Why aren't the includes working from the
> > Jamroot?
> > >> >
> > >> > The bhome env variable is defined as an absolute path.
> > >> >
> > >>
> > >> I'm almost positive environment variables don't get added as jam
> > >> variables. You would need to do something like:
> > >>
> > >> import modules ;
> > >> bhome = [ modules.peek : bhome ] ;
> > >>
> > >>
> > >> My guess would be that it's running the compile from whatever directory
> > >> you're in and picking up the includes from the working directory.
> >
> > Whenever you want to use 'bhome'. There's no difference whatsoever between
> > Jamroot and Jamfile except that Jamroot inherit properties from
> > user-config.jam,
> > while Jamfile -- from Jamfile/Jamroot in a parent directory.
> >
> > - Volodya
> >
> >
> > _______________________________________________
> > Unsubscribe & other changes:
> > http://lists.boost.org/mailman/listinfo.cgi/boost-build
> >
>


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