Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
| 2 # Copyright 2008, Google Inc. | 2 # Copyright 2008, 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 64 |
| 65 # Add in the msvs tool. | 65 # Add in the msvs tool. |
| 66 env.Tool('msvs') | 66 env.Tool('msvs') |
| 67 | 67 |
| 68 # Pick out variants | 68 # Pick out variants |
| 69 variants = [e['BUILD_TYPE'] for e in environments] | 69 variants = [e['BUILD_TYPE'] for e in environments] |
| 70 # Pick out build targets | 70 # Pick out build targets |
| 71 build_targets = [e.subst('$TARGET_ROOT') for e in environments] | 71 build_targets = [e.subst('$TARGET_ROOT') for e in environments] |
| 72 # pick out sources, headers, and resources | 72 # pick out sources, headers, and resources |
| 73 sources, headers, resources, others = env.GatherInputs( | 73 sources, headers, resources, others = env.GatherInputs( |
| 74 [SCons.Script.Dir('.')], | 74 env.Dir('$DESTINATION_ROOT'), |
| 75 ['.+\\.(c|cc|m|mm|cpp)$', # source files | 75 ['.+\\.(c|cc|m|mm|cpp)$', # source files |
| 76 '.+\\.(h|hh|hpp)$', # header files | 76 '.+\\.(h|hh|hpp)$', # header files |
| 77 '.+\\.(rc)$', # resource files | 77 '.+\\.(rc)$', # resource files |
| 78 '.*'], # all other files | 78 '.*'], # all other files |
| 79 exclude_pattern=exclude_pattern, | 79 exclude_pattern=exclude_pattern, |
| 80 ) | 80 ) |
| 81 # Build main Visual Studio Project file | 81 # Build main Visual Studio Project file |
| 82 project_list = env.MSVSProject(target=solution_name + | 82 project_list = env.MSVSProject( |
| 83 env['MSVSPROJECTSUFFIX'], | 83 target=solution_name + env['MSVSPROJECTSUFFIX'], |
| 84 srcs=sources + headers + others + resources, | 84 srcs=sources + headers + others + resources, |
| 85 incs=[], | 85 incs=[], |
| 86 misc=[], | 86 misc=[], |
| 87 resources=[], | 87 resources=[], |
| 88 auto_build_solution=0, | 88 auto_build_solution=0, |
| 89 MSVSCLEANCOM='hammer.bat -c MODE=all', | 89 MSVSCLEANCOM='hammer.bat -c MODE=all', |
| 90 MSVSBUILDCOM='hammer.bat MODE=all', | 90 MSVSBUILDCOM='hammer.bat MODE=all', |
| 91 MSVSREBUILD='hammer.bat -c MODE=all;' | 91 MSVSREBUILD='hammer.bat -c MODE=all;' |
| 92 'hammer.bat MODE=all', | 92 'hammer.bat MODE=all', |
|
sgk
2008/11/04 00:29:03
Make part of string on previous line.
| |
| 93 buildtarget=build_targets, | 93 buildtarget=build_targets, |
| 94 variant=variants) | 94 variant=variants) |
| 95 # Collect other projects | 95 # Collect other projects |
| 96 for e in extra_build_targets: | 96 for e in extra_build_targets: |
| 97 # Explicitly create a node for target, so SCons will expand env variables. | 97 # Explicitly create a node for target, so SCons will expand env variables. |
| 98 build_target = env.File(extra_build_targets[e]) | 98 build_target = env.File(extra_build_targets[e]) |
| 99 # Create an empty project that only has a build target. | 99 # Create an empty project that only has a build target. |
| 100 project_list += env.MSVSProject(target='projects/' + e + '/' + e + | 100 project_list += env.MSVSProject(target='projects/' + e + '/' + e + |
| 101 env['MSVSPROJECTSUFFIX'], | 101 env['MSVSPROJECTSUFFIX'], |
| 102 srcs=[], | 102 srcs=[], |
| 103 incs=[], | 103 incs=[], |
| 104 resources=[], | 104 resources=[], |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 122 | 122 |
| 123 def generate(env): | 123 def generate(env): |
| 124 # NOTE: SCons requires the use of this name, which fails gpylint. | 124 # NOTE: SCons requires the use of this name, which fails gpylint. |
| 125 """SCons entry point for this tool.""" | 125 """SCons entry point for this tool.""" |
| 126 | 126 |
| 127 # Add in the gather_inputs tool. | 127 # Add in the gather_inputs tool. |
| 128 env.Tool('gather_inputs') | 128 env.Tool('gather_inputs') |
| 129 | 129 |
| 130 # Add a method to generate a combined solution file. | 130 # Add a method to generate a combined solution file. |
| 131 env.AddMethod(Solution, 'Solution') | 131 env.AddMethod(Solution, 'Solution') |
| OLD | NEW |