Boost logo

Boost-Build :

Subject: Re: [Boost-build] Compiling a single file
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2012-04-11 15:06:02


Thanks Jorge and Mateusz!

That indeed does work. However, my project is obviously more complicated than this simple jamroot example and that is what I cannot get to work. Here is another example:

DIR/Jamfile.jam:

exe main : file.c ;

jamroot.jam:

use-project /TEST : DIR ;

Commands that work:

bjam /TEST//main <- Builds main.exe
cd DIR
bjam file.obj <- Builds file.obj! Which I did not know worked before

Command that don't appear to work:

bjam /TEST//test.obj
bjam DIR/test.obj
bjam DIR//test.obj

which all get something like this:

notice: could not find main target DIR//file.obj
notice: assuming it is a name of file to create.
don't know how to make <e>DIR//file.obj
...found 1 target...
...can't find 1 target...

Thanks again,

Chris

From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Jorge Suit Perez Ronda
Sent: Wednesday, April 11, 2012 10:25 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Compiling a single file

Hi, you can do

bjam file.obj

regards,

2012/4/11 Nogradi, Chris <Chris.Nogradi_at_[hidden]<mailto:Chris.Nogradi_at_[hidden]>>
Thanks for the reply. I have read through the tutorial before but I still must be missing it.

Based on this:

exe main : file.c ;

I understand I can do:

bjam main

and it will build file.obj and main.exe

however, I want to only build file.obj from the command line. How do I do that?

bjam file does not work unless I explicitly add a:

obj file : file.c ;
exe main : file ;

But this is not practical to do all over the place. I just want a quick command line option to build/rebuild only an obj from the command line:

Maybe something like:

bjam main..file ??

Thanks,

Chris

-----Original Message-----
From: boost-build-bounces_at_[hidden]<mailto:boost-build-bounces_at_[hidden]> [mailto:boost-build-bounces_at_[hidden]<mailto:boost-build-bounces_at_[hidden]>] On Behalf Of Mateusz Loskot
Sent: Wednesday, April 11, 2012 9:36 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Compiling a single file

On 11 April 2012 15:15, Nogradi, Chris <Chris.Nogradi_at_[hidden]<mailto:Chris.Nogradi_at_[hidden]>> wrote:
> Does anyone compile a single file from a lib or exe? If so what would the
> bjam syntax be to compile main.c only for something like this:
>
> exe : main.c ;

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

or similar but with a bit more verbose/complete explanation

http://www.highscore.de/cpp/boostbuild/

Best regards,

--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.
Thank you for your cooperation.
_______________________________________________
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