Installing a File Under a Different Name

The Install method preserves the name of the file when it is copied into the destination directory. If you need to change the name of the file when you copy it, use the InstallAs function:

       env = Environment()
       hello = env.Program('hello.c')
       env.InstallAs('/usr/bin/hello-new', hello)
       env.Alias('install', '/usr/bin')
    

This installs the hello program with the name hello-new as follows:

       % scons -Q install
       cc -o hello.o -c hello.c
       cc -o hello hello.o
       Install file: "hello" as "/usr/bin/hello-new"