user1005909
user1005909

Reputation: 1975

Is there a way to force SCons to overwrite copied directories?

I have the following command to copy a directory of HTML files:

env.Command(target, source, [Copy('$TARGET', '$SOURCE'), Chmod('$TARGET', 0755)])

This copies the directory to the correct location as I expect. But if I make a change to a file, the file does not have the new contents after I run the install again. Is there a way to force an overwrite?

Upvotes: 0

Views: 366

Answers (1)

dirkbaechle
dirkbaechle

Reputation: 4052

Please use the env.Install() method instead, and don't use directory names as $SOURCE. You'll have to install all your files single. Note that in SCons, like every other build system out there, a directory is up-to-date as soon as it exists. So, once you copied your source folder it won't get updated anymore.

See also the SCons FAQ, "Why is my directory only updated the first time?".

Upvotes: 2

Related Questions