[Scons-users] Copying and merging directories
pwsteele at gmail.com
Sun Sep 9 13:07:43 EDT 2012
I changed my code to use
env.Alias('copy', env.Command('copy', , env.Install(TO_DIR,
but nothing gets copied when this is run. What am I missing? One thing I
should mention is that source directory (FROM_DIR) is in fact a directory
hierarchy, not just a simple list of files. I want the entire tree copied to
TO_DIR, retaining the directory structure.
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org]
On Behalf Of William Deegan
Sent: Saturday, September 08, 2012 9:19 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Copying and merging directories
On Sep 8, 2012, at 5:30 PM, Peter Steele <pwsteele at gmail.com> wrote:
I have a Sconscript that looks this like:
FROM_DIR = "/mysrcdir/data"
TO_DIR = "/mydstdir"
env.Alias('copy', env.Command('copy', , Copy(TO_DIR, FROM_DIR)))
This will fail if the directory /mydstdir already exists, which in my case
it definitely will exist. The copy operation is intended to copy additional
files into this target directory directory, merging the files copied from
/mysrcdir/data with the files already present in /mydstdir. Beyond writing
explicit Python code to do it, how can I get scons to not complain if the
destination already when a Copy operation is done?
Use env.Install and env.Glob to find the files.
Don't copy directories as they automatically depend on their included files,
but won't be updated if the directory content changes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scons-users