[Scons-users] Issue with Alias, Install and Dependecies

Remis luisremis at pm.me
Thu May 2 12:06:40 EDT 2019


Hi all,

I have the following SConstruct file:

"""

AddOption('--prefix', dest='prefix',
                      type='string',
                      default='/usr/local/',
                      nargs=1,
                      action='store',
                      metavar='DIR',
                      help='installation prefix')

.
.
.

prefix = str(GetOption('prefix'))

env.Alias('install-bin', env.Install(os.path.join(prefix, "bin"),
      source="MainProject"))
env.Alias('install-client', env.Install(os.path.join(prefix, "lib"),
      source="client/cpp/libproject-client.so"))
env.Alias('install-utils', env.Install(os.path.join(prefix, "lib"),
      source="utils/libproject-utils.so"))
env.Alias('install', ['install-bin', 'install-client', 'install-utils'])

"""

MainProject and libproject-client.so depend on libproject-utils.so


When I run:

    scons -j64

scons will try to install libproject-utils.so at /usr/local.
This is not what I wanted, as I just want to all the libraries and executables to be install only if I specify "install" when calling scons.


Is this expected behavior? I am guessing that because of the dependency, scons is trying to install the utils library before linking the main executable.

Any help on how to work around this is valuable.

Thanks,
Luis




More information about the Scons-users mailing list