A better approach would be to use the target and Command () builder, for example:
 prgTarget = env.Program( "program_name", [ "file1.cc", "file2.cc" ] ) Command(target = "../program_name", source = prgTarget, action = Copy("$TARGET", "$SOURCE")) 
Or, depending on the situation, use Install () builder , for example:
 prgTarget = env.Program( "program_name", [ "file1.cc", "file2.cc" ] ) Install("../program_name", source = prgTarget) 
Brady  source share