Boost logo

Boost-Build :

From: Dirk Griffioen (dirk_at_[hidden])
Date: 2007-10-30 13:21:17


Hi Phillip,

I read the post differently

exe myExe : myExe.cpp : <name>fooBar.exe ;

would mean to me 'build an exe with the name myExe, but on install,
rename it to fooBar.exe'

but I might have read into it, since that was my problem - hence my
answer ...

the

<tag>@apago_tag

way would add to a target, I would like strip as in change the target
name on installation

Would it be possible to change the name of a target on installation?

Regards, Dirk

Phillip Seaver wrote:
> Greg Landrum wrote, on 10/26/2007 12:01 AM:
>
>> Hi,
>>
>> I'm considering moving a project I maintain from make to boost.build
>> and have encountered what seems like a relatively simple problem: I'd
>> like to be able to specify the name of the files created by exe rules.
>>
>> For example, I'd like to be able to do something like:
>> exe myExe : myExe.cpp : <name>fooBar.exe ;
>> and be sure that the output file from this rule is name fooBar.exe, no
>> matter what system I'm on or what type of build I'm doing.
>> Then when I do a rule like:
>> install testExecs : myExe ;
>> I will end up, again regardless of system or build type, with the
>> file: testExecs/fooBar.exe
>>
>> Is this possible?
>>
>> thanks,
>> -greg
>>
>
> Well, you could do:
>
> exe fooBar : myExe.cpp ;
>
> ...and that would get you fooBar.exe on Windows (at least). The name of
> the output file is based on the name of the target -- see
> http://boost.org/doc/html/bbv2/advanced.html#id2120913
>
> If you really want the ".exe" extension on all platforms, you could try
> this:
>
> import type : change-generated-target-suffix ;
> type.change-generated-target-suffix EXE : : exe ;
>
> You'd probably have to put it in your root jam file, though, or you
> could modify exe.jam in your boost-build distribution to just have "type
> EXE : exe ;". That said, boost-build tries to go with the platform
> naming convention, and most unix platforms don't use .exe (to the best
> of my knowledge).
>
> Another way to handle it could be something like this:
> http://article.gmane.org/gmane.comp.lib.boost.build/13019 On re-reading
> the post, it's not clear that I do something like "exe foo : foo.c :
> <tag>@apago_tag ;" to get the desired affect. :-)
>
> As far as the install goes, the first parameter to install ("testExecs"
> in your example) is just the name of the install target. It doesn't
> affect the destination or name of the files installed. You may want
> something like:
>
> "install dist : fooBar : <location>testExecs ;"
>
> "install" docs:
> http://boost.org/doc/html/bbv2/tasks.html#bbv2.tasks.installing
> <tag> feature: http://boost.org/doc/html/bbv2/reference.html and search
> for "tag feature" (used in the post I mention above).
>
> Phillip
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>

-- 
CodeShop BV
Wenckebachweg 150-B
1096 AB Amsterdam
www.code-shop.com
+31 6 411 92 024


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