[bbv2] using an external tool svnrev/subversion

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bbv2] using an external tool svnrev/subversion

Renaud Lepère
I'm using a small tool svnrev with subversion version
control. svnrev is used to generate a file (svnrev.h)
containing macros about version/date given informations
($Id$) in source files ...

In makefile world, svnrev can be used using a line

svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
    svnrev $?

How can i do something similar in bbv2 ?

Thanks

Renaud

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bbv2] using an external tool svnrev/subversion

Vladimir Prus
Hi Renaud,

> I'm using a small tool svnrev with subversion version
> control. svnrev is used to generate a file (svnrev.h)
> containing macros about version/date given informations
> ($Id$) in source files ...
>
> In makefile world, svnrev can be used using a line
>
> svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
>     svnrev $?
>
> How can i do something similar in bbv2 ?

The simplest way, I believe, is this:

make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h : svnrev ;

actions svnrev
{
        svnrev -o$(<) $(>)
}

HTH,
Volodya
_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bbv2] using an external tool svnrev/subversion

Renaud Lepère
In reply to this post by Renaud Lepère
> > In makefile world, svnrev can be used using a line
> >
> > svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
> >     svnrev $?
> >
> > How can i do something similar in bbv2 ?
>
> The simplest way, I believe, is this:
>
> make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
> : svnrev ;
>
> actions svnrev
> {
> svnrev -o$(<) $(>)
> }
It's impressive and really simple ! Thanks a lot.
I just still have a little problem : svnrev.h is generated
in the bin/... directory and if i include it in one of my file
it can not be found at compile it. What should i do ?
Thanks

Renaud


_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bbv2] using an external tool svnrev/subversion

Vladimir Prus
On Tuesday 24 January 2006 18:59, Renaud Lepere wrote:

> > > In makefile world, svnrev can be used using a line
> > >
> > > svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
> > >     svnrev $?
> > >
> > > How can i do something similar in bbv2 ?
> >
> > The simplest way, I believe, is this:
> >
> > make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h
> >
> > : svnrev ;
> >
> > actions svnrev
> > {
> > svnrev -o$(<) $(>)
> > }
>
> It's impressive and really simple ! Thanks a lot.
> I just still have a little problem : svnrev.h is generated
> in the bin/... directory and if i include it in one of my file
> it can not be found at compile it. What should i do ?

Try <implicit-dependency> as documented at:
 
http://boost.org/boost-build2/doc/html/bbv2/reference/jamfiles.html#bbv2.reference.headers

- Volodya
_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build