Boost logo

Boost-Build :

Subject: [Boost-build] Changed (wrong?) behavior with make/common.copy in master
From: Chambers, Matthew (matt.chambers42_at_[hidden])
Date: 2018-06-08 19:12:40


On master (c3dc95d3ac0219a0f774e6d382ed91d290cbde80) the behavior of my old make/copy targets has broken. With this simple Jamroot:
> make copied.txt : others/others.txt : common.copy ;
> make copied.txt : darwin/darwin.txt : common.copy : <toolset>darwin ;
>
> actions make_libsettings
> {
>     echo boo > "$(<[1])"
> }
> make bar.txt : : @make_libsettings : <location>bin/foo <dependency>copied.txt ;

Here is the output of running b2 with -n.
> common.mkdir bin\msvc-14.1
>         if not exist "bin\msvc-14.1\\" mkdir "bin\msvc-14.1"
>
> common.copy bin\msvc-14.1\copied.txt
>     copy /b "others\others.txt" + this-file-does-not-exist-A698EE7806899E69 "bin\msvc-14.1\copied.txt"
>
> common.mkdir bin\foo
>         if not exist "bin\foo\\" mkdir "bin\foo"
>
> Jamfile<C:\copytest>.make_libsettings bin\foo\bar.txt
>     echo boo > "bin\foo\bar.txt"

I get different results if I comment out the second "make copied.txt" alternative:
> common.copy bin\copied.txt
>     copy /b "others\others.txt" + this-file-does-not-exist-A698EE7806899E69 "bin\copied.txt"
>
> common.mkdir bin\foo
>         if not exist "bin\foo\\" mkdir "bin\foo"
>
> Jamfile<C:\copytest>.make_libsettings bin\foo\bar.txt
>     echo boo > "bin\foo\bar.txt"

Here is the result from my older checkout (sometime in late 2017, not sure of the exact commit):
> common.mkdir bin\msvc-14.1
>         if not exist "bin\msvc-14.1\\" mkdir "bin\msvc-14.1"
>
> common.mkdir bin\msvc-14.1\debug
>         if not exist "bin\msvc-14.1\debug\\" mkdir "bin\msvc-14.1\debug"
>
> common.mkdir bin\msvc-14.1\debug\threading-multi
>         if not exist "bin\msvc-14.1\debug\threading-multi\\" mkdir "bin\msvc-14.1\debug\threading-multi"
>
> common.copy bin\msvc-14.1\debug\threading-multi\copied.txt
>     copy /b "others\others.txt" + this-file-does-not-exist-A698EE7806899E69 "bin\msvc-14.1\debug\threading-multi\copied.txt"
>
> common.mkdir bin\foo
>         if not exist "bin\foo\\" mkdir "bin\foo"
>
> Jamfile<C:\copytest>.make_libsettings bin\foo\bar.txt
>     echo boo > "bin\foo\bar.txt"
The result is the same regardless of whether the second "make copied.txt" alternative is commented out or not. My code expects the make
targets to be copied to the full target path of the dependent targets. Is this change intentional?

Thanks,
-Matt


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