[Scons-users] Variant directory

Russell, J.J. russell at slac.stanford.edu
Tue May 6 18:51:04 EDT 2014


I am puzzled by how to properly use 'src_dir' in SConscript

If, in the SConstruct file I specify

SConscript ('pkg/SConscript', variant_dir='pkg/build', src_dir='pkg/src', duplicate=0)

where pkg/src contains foo.c

I get Program ('foo.c') successfully built.

However, if I remove the 'pkg' from the variant_dir, i.e.

SConscript ('pkg/SConscript', variant_dir='build', src_dir='pkg/src', duplicate=0)

The files in 'src/' no longer can be found unless I prepend them with 'src/', i.e. src/foo.c

Any help on the rules of the game with src_dir would be greatly appreciated.

(I have really tried to figure this one out, but after 2 days, I am throwing in the towel.)

JJRussell



More information about the Scons-users mailing list