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

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

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

Renaud Lepère
> 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 ?
...
> Try <implicit-dependency> as documented at:
>  
> http://boost.org/boost-build2/doc/html/bbv2/reference/jamfiles

I still have a small problem with 2 directory

- first one project1 with the given jamfile
make svnrev.h : project1.cpp : svnrev ;
actions svnrev
{
         svnrev -o$(<) $(>)
}
lib project1 : project1.cpp svnrev.h : <implicit-dependency>svnrev.h ;

- second one with the given jamfile
exe main : main.cpp ../project1//project1 ;

If i call bjam -a in the second directory, the svnrev action is not
done ? How can i add a true dependancy between building the lib
and rebuilding the snvrev.h file ?

msvc.compile.c++ bin\msvc-7.1\debug\main.obj
msvc.compile.c++ ..\projet1\bin\msvc-7.1\debug\projet1.obj
.....

Thanks

Renaud

_______________________________________________
Unsubscribe & other changes: 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 07 February 2006 20:48, Renaud Lepere wrote:

> > 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 ?
>
> ...
>
> > Try <implicit-dependency> as documented at:
> >
> > http://boost.org/boost-build2/doc/html/bbv2/reference/jamfiles
>
> I still have a small problem with 2 directory
>
> - first one project1 with the given jamfile
> make svnrev.h : project1.cpp : svnrev ;
> actions svnrev
> {
> svnrev -o$(<) $(>)
> }
> lib project1 : project1.cpp svnrev.h : <implicit-dependency>svnrev.h ;
>
> - second one with the given jamfile
> exe main : main.cpp ../project1//project1 ;
>
> If i call bjam -a in the second directory, the svnrev action is not
> done ? How can i add a true dependancy between building the lib
> and rebuilding the snvrev.h file ?
You can use <dependency>svnrev
But maybe you can try the attached patch? It fixes a problem with the
<implicit-dependency> feature, and if your main.cpp includes svnrev.h, then
with this patch svnrev.h should be rebuilt as needed.

Let me know if this works out.

- Volodya




- Volodya

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

virtual-target.diff (768 bytes) Download Attachment
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

> > > Try <implicit-dependency> as documented at:
> > >
> > > http://boost.org/boost-build2/doc/html/bbv2/reference/jamfiles
> >
> > I still have a small problem with 2 directory
> >
> > - first one project1 with the given jamfile
> > make svnrev.h : project1.cpp : svnrev ;
> > actions svnrev
> > {
> > svnrev -o$(<) $(>)
> > }
> > lib project1 : project1.cpp svnrev.h :
> <implicit-dependency>svnrev.h ;
> >
> > - second one with the given jamfile
> > exe main : main.cpp ../project1//project1 ;
> >
> > If i call bjam -a in the second directory, the svnrev action is not
> > done ? How can i add a true dependancy between building the lib
> > and rebuilding the snvrev.h file ?
>
> You can use <dependency>svnrev
> But maybe you can try the attached patch? It fixes a problem with the
> <implicit-dependency> feature, and if your main.cpp includes
> svnrev.h, then
> with this patch svnrev.h should be rebuilt as needed.
> Let me know if this works out.
>

Hi Volodya,

<dependency>svnrev.h fixed my problem, thanks !
But i tried to include svnrev.h in main.cpp but i didn't succeed
(svnrev.h not found) even if i applied your given patch.. but i have
an old boost-build... I tried to download the newest version from
cvs but my bjam.exe is too old. I will check with the new one if it
is ok.

Thanks

Renaud

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build