OLD | NEW |
1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
2 # Copyright 2009, Google Inc. | 2 # Copyright 2009, Google Inc. |
3 # All rights reserved. | 3 # All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 # Add all keyword arguments to the environment | 118 # Add all keyword arguments to the environment |
119 for k, v in kwargs.items(): | 119 for k, v in kwargs.items(): |
120 env[k] = v | 120 env[k] = v |
121 | 121 |
122 # Add compiler flags for included headers, if any | 122 # Add compiler flags for included headers, if any |
123 env['INCLUDES'] = env.Flatten(env.subst_list(['$INCLUDES'])) | 123 env['INCLUDES'] = env.Flatten(env.subst_list(['$INCLUDES'])) |
124 for h in env['INCLUDES']: | 124 for h in env['INCLUDES']: |
125 env.Append(CCFLAGS=['${CCFLAG_INCLUDE}%s' % h]) | 125 env.Append(CCFLAGS=['${CCFLAG_INCLUDE}%s' % h]) |
126 | 126 |
127 # This supports a NaCl convention that was previously supported with a | |
128 # modification to SCons. Previously, EXTRA_LIBS was interpolated into LIBS | |
129 # using the ${EXTRA_LIBS} syntax. It appears, however, that SCons naturally | |
130 # computes library dependencies before interpolation, so EXTRA_LIBS will not | |
131 # be correctly depended upon if interpolated. In the past, SCons was modified | |
132 # to force interpolation before library dependencies were computed. This new | |
133 # approach allows us to use an unmodified version of SCons. | |
134 # In general, the use of EXTRA_LIBS is discouraged. | |
135 if 'EXTRA_LIBS' in env: | |
136 env['LIBS'] = env['EXTRA_LIBS'] + env['LIBS'] | |
137 | |
138 # Call platform-specific component setup function, if any | 127 # Call platform-specific component setup function, if any |
139 if env.get('COMPONENT_PLATFORM_SETUP'): | 128 if env.get('COMPONENT_PLATFORM_SETUP'): |
140 env['COMPONENT_PLATFORM_SETUP'](env, builder_name) | 129 env['COMPONENT_PLATFORM_SETUP'](env, builder_name) |
141 | 130 |
142 # Return the modified environment | 131 # Return the modified environment |
143 return env | 132 return env |
144 | 133 |
145 #------------------------------------------------------------------------------ | 134 #------------------------------------------------------------------------------ |
146 | 135 |
147 # TODO: Should be possible to refactor programs, test programs, libs to all | 136 # TODO: Should be possible to refactor programs, test programs, libs to all |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 AddTargetGroup('all_libraries', 'libraries can be built') | 610 AddTargetGroup('all_libraries', 'libraries can be built') |
622 AddTargetGroup('all_programs', 'programs can be built') | 611 AddTargetGroup('all_programs', 'programs can be built') |
623 AddTargetGroup('all_test_programs', 'tests can be built') | 612 AddTargetGroup('all_test_programs', 'tests can be built') |
624 AddTargetGroup('all_packages', 'packages can be built') | 613 AddTargetGroup('all_packages', 'packages can be built') |
625 AddTargetGroup('run_all_tests', 'tests can be run') | 614 AddTargetGroup('run_all_tests', 'tests can be run') |
626 AddTargetGroup('run_disabled_tests', 'tests are disabled') | 615 AddTargetGroup('run_disabled_tests', 'tests are disabled') |
627 AddTargetGroup('run_small_tests', 'small tests can be run') | 616 AddTargetGroup('run_small_tests', 'small tests can be run') |
628 AddTargetGroup('run_medium_tests', 'medium tests can be run') | 617 AddTargetGroup('run_medium_tests', 'medium tests can be run') |
629 AddTargetGroup('run_large_tests', 'large tests can be run') | 618 AddTargetGroup('run_large_tests', 'large tests can be run') |
630 | 619 |
OLD | NEW |