Search code examples
scons

Why scons Copy doesn't copy?


Can anybody explain for newbies familiar with other scripting languages, why this SConstruct doesn't create acopy.txt of itself?

Copy('acopy.txt', 'SConstruct')

Solution

  • Copy() returns an Action, to be used in a Builder. You either need to wrap it in a Command() call or, if you want it to always be executed, wrap it in an Execute() call.

    Execute(Copy('acopy.txt', 'SConstruct'))
    

    SCons man page should give more info..