5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__
= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
28 Verify that we don't add $LIBPREFIX to library names in $LIBS that
29 already have the prefix on them.
36 test
= TestSCons
.TestSCons()
38 blender_exe
= test
.workpath('blender' + _exe
)
40 test
.subdir('src', ['src', 'component1'], ['src', 'component2'])
42 test
.write('SConstruct', """\
43 SConscript(['src/SConscript'])
46 libraries = (['libtest_component2',
47 'libtest_component1'])
49 # To remove the dependency problem, you should rename blender to mlender.
50 Program(source='main.c',
55 CPPPATH=['src/component2'])
58 test
.write('main.c', """\
69 test
.write(['src', 'SConscript'], """\
70 SConscript(['component1/SConscript',
71 'component2/SConscript'])
74 test
.write(['src', 'component1', 'SConscript'], """\
75 source_files = ['message1.c']
76 Library(target='../../lib/libtest_component1',
81 test
.write(['src', 'component1', 'message1.c'], """\
84 void DisplayMessage1 (void)
86 printf ("src/component1/message.c\\n");
90 test
.write(['src', 'component1', 'message1.h'], """\
91 void DisplayMessage1 (void);
94 test
.write(['src', 'component2', 'SConscript'], """\
95 source_files = ['message2.c']
96 include_paths = ['../component1']
97 Library(target='../../lib/libtest_component2',
99 CPPPATH=include_paths)
102 test
.write(['src', 'component2', 'message2.h'], """\
103 void DisplayMessage2 (void);
106 test
.write(['src', 'component2', 'message2.c'], """\
108 #include "message1.h"
110 void DisplayMessage2 (void)
113 printf ("src/component2/hello.c\\n");
117 test
.run(arguments
= '.',
118 stderr
=TestSCons
.noisy_ar
,
119 match
=TestSCons
.match_re_dotall
)
121 test
.run(program
=blender_exe
,
122 stdout
='src/component1/message.c\nsrc/component2/hello.c\n')
128 # indent-tabs-mode:nil
130 # vim: set expandtab tabstop=4 shiftwidth=4: