Re: Issue with Alias, Install and Dependecies
Gary Oberbrunner <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAFChFyh1tjvGMDGHz6Jg8jL9nS-85utcBnBHvZSQuwDrD6XN+Q@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > -- Gary _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users