Hi, I try to setup a build system to build a shared lib MySharedLib and a binary MyBinary that rely on MySharedLib. The build system should be able to install MySharedLib and MyBinary when asked for it, and only when asked for it.
import os.path
env = Environment()
env.Append(CCFLAGS='-g -Wall -ansi -O2')
prefix = '/usr/local'
lib_dir = os.path.join(prefix, 'lib')
bin_dir = os.path.join(prefix, 'bin')
Export('env prefix lib_dir bin_dir')
libMySharedLib = SConscript('libMySharedLib/SConscript')
MyBinary = SConscript('MyBinary/SConscript')
env.Alias('install', env.Install(lib_dir, libMySharedLib))
env.Alias('install', env.Install(bin_dir, MyBinary))
When I run SCons with no command line arguments, MySharedLib and MyBinary are built, but it also it try to install them. I want them installed only just when I ask for the install target. I tried many times, read the docs, but I can't figure it out.