[Scons-users] Copy command
Tom Tanner (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Wed May 1 05:18:03 EDT 2013
It's basically a messy script that does something like this:
env.Command(target, [ source1, source2, ... ],
[ '$SOURCES[1]',
Copy(some_other_file, 'file_generated_by_$SOURCES_1'),
Copy(yet_another_file, '$SOURCES[2]')
'$SOURCES[0] > $TARGET') ]
because $SOURCES[0] needs some_file and yet_another_file to exist.
This is under SCons 2.2 under solaris 10 and AIX 6.1. Note that the targets of the Copy aren't targets of any rule, so don't get automatically deleted, and they aren't necessarily owned by the builder, so can't be written to,
I looked at that script for a while and decided it was a mess and refactored it so that the intermediate files became targets of build rules, and sources of the last rule, and I don't think I'm going to see the problem again.
But I don't think Copy can overwrite a file to which you don't have write permission. I'm not sure whether this is a good thing or not (as it probably means you've done something wrong if you're trying to do this).
----- Original Message -----
From: garyo at oberbrunner.com
To: Tom Tanner (BLOOMBERG/ LONDON), scons-users at scons.org
At: Apr 30 2013 13:23:56
It should do it already, unless the dest file is not writable. Can you send an example? (Including OS and SCons version please)
On Tue, Apr 30, 2013 at 5:11 AM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:
Is there any way of making Copy overwrite the target file (like cp -f), so if it can write the file, it will do so, or do I have to Delete the target first?
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
--
Gary
More information about the Scons-users
mailing list