Boost logo

Boost-Build :

Subject: Re: [Boost-build] Changed (wrong?) behavior with make/common.copy in master
From: Chambers, Matthew (matt.chambers42_at_[hidden])
Date: 2018-07-09 13:39:42

On 7/7/2018 12:17 AM, Steven Watanabe via Boost-build wrote:
>> Thanks for the quick answer Steven. There's aspect of the old behavior I
>> haven't been able to reproduce:
>> If I make a target depend on copied.txt from a different project
>> (directory), how do I get the copied.txt's <location> to be based on the
>> dependent target rather than the path components of the project that
>> copied.txt is defined in?
> I'm not sure I understand what you're trying to do
> here. I realize that sometimes files may need to be
> in the same directory, but if the dependent target is
> in a different project, then that automatically means
> that you get different build directories.

OK, a more complete example:


    make copied.txt : others/others.txt : common.copy ;
    exe foo : foo.cpp : <dependency>copied.txt ;

    run testfoo testfoo.cpp : input.txt : : <dependency>../src//foo <dependency>../src//copied ;

Suppose in order for foo and testfoo to run, they need to have copied.txt in the same directory as the executable. For foo, I can do that by
making it depend on a compiled target, like:

    obj foo_o : foo.cpp ;
    make copied.txt : others/others.txt : common.copy : <dependency>foo_o ;
    exe foo : foo_o : <dependency>copied.txt ;

Annoying, but better than <relevant>[every single feature that can go in a build path]. But how can I do the same for testfoo? Is there a
shortcut like <relevant>all ? Or can that be implemented easily?


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at