| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 kwargs: Keyword arguments. | 455 kwargs: Keyword arguments. |
| 456 | 456 |
| 457 Returns: | 457 Returns: |
| 458 Output node list from env.Program(). | 458 Output node list from env.Program(). |
| 459 """ | 459 """ |
| 460 # Clone and modify environment | 460 # Clone and modify environment |
| 461 env = _ComponentPlatformSetup(self, 'ComponentProgram', **kwargs) | 461 env = _ComponentPlatformSetup(self, 'ComponentProgram', **kwargs) |
| 462 | 462 |
| 463 env['PROGRAM_BASENAME'] = prog_name | 463 env['PROGRAM_BASENAME'] = prog_name |
| 464 | 464 |
| 465 if env['PROGSUFFIX'] and env.subst(prog_name).endswith(env['PROGSUFFIX']): |
| 466 # Temporary hack: If there's already an extension, remove it. |
| 467 # Because PPAPI is revision locked, and expects to be able to use .nexe |
| 468 # TODO: When PPAPI deps is rolled, replace with this: |
| 469 # raise Exception("Program name shouldn't have a suffix") |
| 470 prog_name = env.subst(prog_name) |
| 471 prog_name = prog_name[:-len(env['PROGSUFFIX'])] |
| 472 |
| 465 # Call env.Program() | 473 # Call env.Program() |
| 466 out_nodes = env.Program(prog_name, *args, **kwargs) | 474 out_nodes = env.Program(prog_name, *args, **kwargs) |
| 467 | 475 |
| 468 # Add dependencies on includes | 476 # Add dependencies on includes |
| 469 env.Depends(out_nodes, env['INCLUDES']) | 477 env.Depends(out_nodes, env['INCLUDES']) |
| 470 | 478 |
| 471 # Publish output | 479 # Publish output |
| 472 env.Publish(prog_name, 'run', out_nodes[0]) | 480 env.Publish(prog_name, 'run', out_nodes[0]) |
| 473 env.Publish(prog_name, 'debug', out_nodes[1:]) | 481 env.Publish(prog_name, 'debug', out_nodes[1:]) |
| 474 | 482 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 AddTargetGroup('all_libraries', 'libraries can be built') | 629 AddTargetGroup('all_libraries', 'libraries can be built') |
| 622 AddTargetGroup('all_programs', 'programs can be built') | 630 AddTargetGroup('all_programs', 'programs can be built') |
| 623 AddTargetGroup('all_test_programs', 'tests can be built') | 631 AddTargetGroup('all_test_programs', 'tests can be built') |
| 624 AddTargetGroup('all_packages', 'packages can be built') | 632 AddTargetGroup('all_packages', 'packages can be built') |
| 625 AddTargetGroup('run_all_tests', 'tests can be run') | 633 AddTargetGroup('run_all_tests', 'tests can be run') |
| 626 AddTargetGroup('run_disabled_tests', 'tests are disabled') | 634 AddTargetGroup('run_disabled_tests', 'tests are disabled') |
| 627 AddTargetGroup('run_small_tests', 'small tests can be run') | 635 AddTargetGroup('run_small_tests', 'small tests can be run') |
| 628 AddTargetGroup('run_medium_tests', 'medium tests can be run') | 636 AddTargetGroup('run_medium_tests', 'medium tests can be run') |
| 629 AddTargetGroup('run_large_tests', 'large tests can be run') | 637 AddTargetGroup('run_large_tests', 'large tests can be run') |
| 630 | 638 |
| OLD | NEW |