SCons User Guide 1.1.0 | ||
---|---|---|
Prev | Chapter 13. Installing Files in Other Directories: the Install Builder | Next |
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"