[Scons-users] Repositories and rstr/rfile
Gary Oberbrunner
garyo at oberbrunner.com
Thu May 15 13:03:05 EDT 2014
On Thu, May 15, 2014 at 3:52 AM, Tom Tanner (BLOOMBERG/ LONDON) <
ttanner2 at bloomberg.net> wrote:
> Sorry, my reply got lost somewhere I think (posibly by me)
>
> This doesn't work. The .rsrcpath on exists for $SOURCE and presumably
> $TARGET
>
> The underlying problem appears to be that when you are using a repository,
> if you have a build that copies stuff from the repository directly to the
> build directory then there's no way of finding out the original file when
> you do a build.
>
> Node.srcifle etc etc all assume if the file exists then that's the file to
> use, and only if it doesn't exist should you search in the repository.
>
> Now, I'm not entirely sure that a build rule where the target name and the
> source name are effectively identical is a sane rule, but it is allowed,
> even if messy.
>
> I just wonder if
> a) The person who wrote this is being rather silly and should be persuaded
> to do something else
> b) scons should warn/error if you do something like that
> c) scons should have something that given a Node, returns you the filename
> from the repository irrespective of whether the file exists in the build
> directory
>
How about just making it a python action, and check if the source and
target are the same before doing the shutil.copyfile?
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140515/87c52b4a/attachment.html
More information about the Scons-users
mailing list