Re: Run a program on anything

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

Re: Run a program on anything

Chris Hoeppler
Vladimir Prus <ghost <at> cs.msu.su> writes:

>
> On Friday 06 January 2006 19:48, Phillip Seaver wrote:
> > I would like to be able to run a perl script that converts binary files
> > (images, in this case) into source files you can include in your
> > project.  I'd rather not introduce new target types for each extension.
> > What's the best way to go about this?
>
> The 'make' rule.

Could you please give an example of how to use the make rule to run an external
script on some src file to create a target?

> Now a question: anybody can suggest the best place in docs where the 'make'
> rule can be documented, so that interested users can easily find it?

Being a new user of BBv2, I looked for it in the Tutorial and User
Documentation sections.

Regards,
Chris


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

Re: Run a program on anything

Renaud Lepère
Hi

> > > I would like to be able to run a perl script that
> converts binary files
> > > (images, in this case) into source files you can include in your
> > > project.  I'd rather not introduce new target types for
> each extension.
> > > What's the best way to go about this?
> > The 'make' rule.
>
> Could you please give an example of how to use the make rule
> to run an external
> script on some src file to create a target?

I had a similar problem as you recently, i needed to generate an svnrev.h
file with an external tool called svnrev. Here is the solution

make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h : svnrev ;
actions svnrev
{
  svnrev -o$(<) $(>)
}
 
I found a little documentation on the 'make' rule here
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2/UsingStandardGenerators

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: Run a program on anything

Andrew McDonald-4

hi

look in

boost/tools/build/v2/test/generators-test/extra.jam


andrew

))  -----Ursprungliche Nachricht-----
))  Von: [hidden email]
))  [mailto:[hidden email]]Im Auftrag von Renaud Lepere
))  Gesendet: Donnerstag, 26. Januar 2006 11:38
))  An: Boost.Build developer's and user's list
))  Betreff: Re: [Boost-build] Run a program on anything
))
))
))  Hi
))  > > > I would like to be able to run a perl script that
))  > converts binary files
))  > > > (images, in this case) into source files you can include in your
))  > > > project.  I'd rather not introduce new target types for
))  > each extension.
))  > > > What's the best way to go about this?
))  > > The 'make' rule.
))  >
))  > Could you please give an example of how to use the make rule
))  > to run an external
))  > script on some src file to create a target?
))
))  I had a similar problem as you recently, i needed to generate
))  an svnrev.h
))  file with an external tool called svnrev. Here is the solution
))
))  make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h : svnrev ;
))  actions svnrev
))  {
))   svnrev -o$(<) $(>)
))  }
))
))  I found a little documentation on the 'make' rule here
))  http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?B
oost.Build_V2/UsingStandardGenerators

Renaud

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

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

Re: Run a program on anything

Chris Hoeppler
In reply to this post by Renaud Lepère
Renaud Lepere <renaud.lepere <at> alma.fr> writes:

> I had a similar problem as you recently, i needed to generate an svnrev.h
> file with an external tool called svnrev. Here is the solution
>
> make svnrev.h : main.cpp gui.cpp gui.h storage.cpp storage.h : svnrev ;
> actions svnrev
> {
>   svnrev -o$(<) $(>)
> }
>
> I found a little documentation on the 'make' rule here
> http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?
Boost.Build_V2/UsingStandardGenerators

Thanks, that'll get me going.

Chris


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