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

Gary Oberbrunner garyo at oberbrunner.com
Thu May 2 12:25:05 EDT 2019


Running `scons --debug=explain` will tell you why SCons is taking each
action. If your main exe depends on libproject-utils.so from /usr/local,
then yes, it will have to build that. Check your LIBPATH or SHLIBPATH, and
examine the final link line for the exe to see what libs it's pulling in
(probably via -L).

On Thu, May 2, 2019 at 12:06 PM Remis via Scons-users <scons-users at scons.org>
wrote:

> 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
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20190502/bda2d19f/attachment.html>


More information about the Scons-users mailing list