| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Prints the information in a sln file in a diffable way. | 7 """Prints the information in a sln file in a diffable way. |
| 8 | 8 |
| 9 It first outputs each projects in alphabetical order with their | 9 It first outputs each projects in alphabetical order with their |
| 10 dependencies. | 10 dependencies. |
| 11 | 11 |
| 12 Then it outputs a possible build order. | 12 Then it outputs a possible build order. |
| 13 """ | 13 """ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 print "-- --" | 115 print "-- --" |
| 116 | 116 |
| 117 def PrintBuildOrder(projects, deps): | 117 def PrintBuildOrder(projects, deps): |
| 118 print "---------------------------------------" | 118 print "---------------------------------------" |
| 119 print "Build order " | 119 print "Build order " |
| 120 print "---------------------------------------" | 120 print "---------------------------------------" |
| 121 print "-- --" | 121 print "-- --" |
| 122 | 122 |
| 123 built = [] | 123 built = [] |
| 124 for (project, dep_list) in sorted(deps.items()): | 124 for (project, _) in sorted(deps.items()): |
| 125 if project not in built: | 125 if project not in built: |
| 126 BuildProject(project, built, projects, deps) | 126 BuildProject(project, built, projects, deps) |
| 127 | 127 |
| 128 print "-- --" | 128 print "-- --" |
| 129 | 129 |
| 130 def PrintVCProj(projects): | 130 def PrintVCProj(projects): |
| 131 | 131 |
| 132 for project in projects: | 132 for project in projects: |
| 133 print "-------------------------------------" | 133 print "-------------------------------------" |
| 134 print "-------------------------------------" | 134 print "-------------------------------------" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 159 PrintDependencies(projects, deps) | 159 PrintDependencies(projects, deps) |
| 160 PrintBuildOrder(projects, deps) | 160 PrintBuildOrder(projects, deps) |
| 161 | 161 |
| 162 if '--recursive' in sys.argv: | 162 if '--recursive' in sys.argv: |
| 163 PrintVCProj(projects) | 163 PrintVCProj(projects) |
| 164 return 0 | 164 return 0 |
| 165 | 165 |
| 166 | 166 |
| 167 if __name__ == '__main__': | 167 if __name__ == '__main__': |
| 168 sys.exit(main()) | 168 sys.exit(main()) |
| OLD | NEW |