env['SWIGFLAGS'] = SCons.Util.CLVar('')
env['SWIGCFILESUFFIX'] = '_wrap$CFILESUFFIX'
env['SWIGCXXFILESUFFIX'] = '_wrap$CXXFILESUFFIX'
- env['_SWIGOUTDIR'] = '${"-outdir " + str(SWIGOUTDIR)}'
+ env['_SWIGOUTDIR'] = r'${"-outdir \"%s\"" % SWIGOUTDIR}'
env['SWIGPATH'] = []
env['SWIGINCPREFIX'] = '-I'
env['SWIGINCSUFFIX'] = ''
Java_foo_interface = env.SharedLibrary(
'Java_foo_interface',
'Java_foo_interface.i',
- SWIGOUTDIR = 'java/build',
+ SWIGOUTDIR = 'java/build dir',
SWIGFLAGS = '-c++ -java -Wall',
SWIGCXXFILESUFFIX = "_wrap.cpp")
""" % locals())
%module foopack
""")
-# SCons should realize that it needs to create the java/build
-# subdirectory to hold the generate .java files.
+# SCons should realize that it needs to create the "java/build dir"
+# subdirectory to hold the generated .java files.
test.run(arguments = '.')
+test.must_exist('java/build dir/foopackJNI.java')
+test.must_exist('java/build dir/foopack.java')
+
# SCons should remove the built .java files.
-test.run(arguments = '-c java/build/foopack.java java/build/foopackJNI.java')
+test.run(arguments = '-c')
-test.must_not_exist('java/build/foopackJNI.java')
-test.must_not_exist('java/build/foopack.java')
+test.must_not_exist('java/build dir/foopackJNI.java')
+test.must_not_exist('java/build dir/foopack.java')
# SCons should realize it needs to rebuild the removed .java files.
test.not_up_to_date(arguments = '.')
+test.must_exist('java/build dir/foopackJNI.java')
+test.must_exist('java/build dir/foopack.java')
test.pass_test()