summaryrefslogtreecommitdiffstats
path: root/test/SharedLibrary.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-06-15 04:53:49 (GMT)
committerSteven Knight <knight@baldmt.com>2002-06-15 04:53:49 (GMT)
commit77d43537975b406379979d599894971bf4a225f2 (patch)
tree93c8e6987a60b53f5ca0e3bc986bdcb4208893f3 /test/SharedLibrary.py
parentcef5b7fa735eb4e405fab5f852df8e7d53c76954 (diff)
downloadSCons-77d43537975b406379979d599894971bf4a225f2.zip
SCons-77d43537975b406379979d599894971bf4a225f2.tar.gz
SCons-77d43537975b406379979d599894971bf4a225f2.tar.bz2
Add LIBS and LIBPATH dependencies for shared libraries. (Charles Crain)
Diffstat (limited to 'test/SharedLibrary.py')
-rw-r--r--test/SharedLibrary.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/test/SharedLibrary.py b/test/SharedLibrary.py
index dfe05af..56738c7 100644
--- a/test/SharedLibrary.py
+++ b/test/SharedLibrary.py
@@ -34,16 +34,22 @@ test.write('SConstruct', """
env=Environment(WIN32_INSERT_DEF=1)
env2 = Environment(LIBS = [ 'foo1', 'foo2', 'foo3' ],
LIBPATH = [ '.' ])
-env.Library(target = 'foo1', source = 'f1.c', shared=1)
-env.Library(target = 'foo2', source = Split('f2a.c f2b.c f2c.c'), shared=1)
-env.Library(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'], shared=1)
+env.SharedLibrary(target = 'foo1', source = 'f1.c')
+env.SharedLibrary(target = 'foo2', source = Split('f2a.c f2b.c f2c.c'))
+env.SharedLibrary(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'])
env2.Program(target = 'prog', source = 'prog.c')
""")
test.write('SConstructFoo', """
env=Environment()
-obj = env.Object('foo', 'foo.c', shared=0)
-Default(env.Library(target = 'foo', source = obj, shared=1))
+obj = env.Object('foo', 'foo.c')
+Default(env.SharedLibrary(target = 'foo', source = obj))
+""")
+
+test.write('SConstructFoo2', """
+env=Environment()
+obj = env.SharedObject('foo', 'foo.c')
+Default(env.Library(target = 'foo', source = obj))
""")
test.write('foo.c', r"""
@@ -182,8 +188,12 @@ test.run(program = test.workpath('prog'),
stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n")
test.run(arguments = '-f SConstructFoo', status=2, stderr='''
-SCons error: Source file: foo\..* must be built with shared=1 in order to be compatible with target: .*
-File ".*", line .*, in .*
+SCons error: Source file: foo\..* is static and is not compatible with shared target: .*
+'''
+)
+
+test.run(arguments = '-f SConstructFoo2', status=2, stderr='''
+SCons error: Source file: foo\..* is shared and is not compatible with static target: .*
'''
)