[Scons-users] SCONS ignores Java in mixed build with C++ - bug in SCONS?
Elliott Wolin
wolin at jlab.org
Thu May 9 14:06:18 EDT 2013
Hi,
I'm building C++ and Java in a single package and I can't get it to
build both Java and C++ at the same time.
The source files live in separate dirs. In a function called by
SConstruct I check for source subdirs and build each one:
# build java code
if(os.path.exists("./java")==True):
javaEnv=env.Clone()
SCons.Script.SConscript('java/SConscript',exports=['javaEnv'],
duplicate=0)
# build C++ code
if(os.path.exists("./src/libsrc")==True):
libEnv=env.Clone()
SCons.Script.SConscript('src/libsrc/SConscript',exports=['libEnv'],
variant_dir='./src/libsrc/.'
+ env['arch'], duplicate=0)
SConscript in the Java dir is:
Import('*')
javaEnv.Java(target = 'build/classes', source = 'org')
javaEnv.Jar(target = 'build/lib/cMsg2et.jar', source =
'build/classes')
and nothing unusual in the C++ dir.
It works fine for Java if I comment out the C++ SConscript() call. If I
uncomment it then it does the C++ but does NOT build Java.
I'm stumped...seems like a bug in SCONS.
--
Sincerely,
Elliott
================================================================================
Those raised in a morally relative or neutral environment will hold
no truths to be self-evident.
Elliott Wolin
Staff Physicist, Jefferson Lab
12000 Jefferson Ave
Suite 8 MS 12A1
Newport News, VA 23606
757-269-7365
================================================================================
More information about the Scons-users
mailing list