[Scons-users] Caching and variant_dir

William Blevins wblevins001 at gmail.com
Fri Nov 20 02:51:25 EST 2015


I think that this happens because the Node in question exists outside the
SConstruct directory tree.

On Fri, Nov 20, 2015 at 4:28 AM, Glen Gibb <glen at barefootnetworks.com>
wrote:

> Hi all,
>
> Caching does not behave as I expect when the variant_dir starts with '..'
> (i.e., pointing up a directory). In this case, caching uses the absolute
> path to the files, rather than the relative path I had hoped it would store.
>
> To illustrate, assume my source directory is /home/example/src. My
> sconsript file is:
>
> CacheDir('/my_cache')
> env = Environment()
> env.SharedLibrary('mylib', ['mylib.cpp'])
>
>
> The following SConscript line line:
>      SConscript('sconscript', variant_dir='build')
> results in caching storing a path beginning with build as I expect:
> 'build/mylib.so'
>
> However, the SConstruct line:
>      SConscript('sconscript', variant_dir='../build')
> results in caching storing the full path: '/home/example/build/mylib.so'
>
>
> Is there a way to stop scons from resolving the .. in my variant_dir to an
> absolute directory?
>
> Regards,
> Glen
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20151120/32f90e6b/attachment.html>


More information about the Scons-users mailing list