OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import filecmp | 5 import filecmp |
6 import gyp.common | 6 import gyp.common |
7 import gyp.xcodeproj_file | 7 import gyp.xcodeproj_file |
8 import gyp.xcode_ninja | 8 import gyp.xcode_ninja |
9 import errno | 9 import errno |
10 import os | 10 import os |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 # SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all | 30 # SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all |
31 # targets that share the same BUILT_PRODUCTS_DIR. | 31 # targets that share the same BUILT_PRODUCTS_DIR. |
32 _shared_intermediate_var = 'SHARED_INTERMEDIATE_DIR' | 32 _shared_intermediate_var = 'SHARED_INTERMEDIATE_DIR' |
33 | 33 |
34 _library_search_paths_var = 'LIBRARY_SEARCH_PATHS' | 34 _library_search_paths_var = 'LIBRARY_SEARCH_PATHS' |
35 | 35 |
36 generator_default_variables = { | 36 generator_default_variables = { |
37 'EXECUTABLE_PREFIX': '', | 37 'EXECUTABLE_PREFIX': '', |
38 'EXECUTABLE_SUFFIX': '', | 38 'EXECUTABLE_SUFFIX': '', |
| 39 'EXTENSION_PREFIX': '', |
| 40 'EXTENSION_SUFFIX': '', |
39 'STATIC_LIB_PREFIX': 'lib', | 41 'STATIC_LIB_PREFIX': 'lib', |
40 'SHARED_LIB_PREFIX': 'lib', | 42 'SHARED_LIB_PREFIX': 'lib', |
41 'STATIC_LIB_SUFFIX': '.a', | 43 'STATIC_LIB_SUFFIX': '.a', |
42 'SHARED_LIB_SUFFIX': '.dylib', | 44 'SHARED_LIB_SUFFIX': '.dylib', |
43 # INTERMEDIATE_DIR is a place for targets to build up intermediate products. | 45 # INTERMEDIATE_DIR is a place for targets to build up intermediate products. |
44 # It is specific to each build environment. It is only guaranteed to exist | 46 # It is specific to each build environment. It is only guaranteed to exist |
45 # and be constant within the context of a project, corresponding to a single | 47 # and be constant within the context of a project, corresponding to a single |
46 # input file. Some build environments may allow their intermediate directory | 48 # input file. Some build environments may allow their intermediate directory |
47 # to be shared on a wider scale, but this is not guaranteed. | 49 # to be shared on a wider scale, but this is not guaranteed. |
48 'INTERMEDIATE_DIR': '$(%s)' % _intermediate_var, | 50 'INTERMEDIATE_DIR': '$(%s)' % _intermediate_var, |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 # to create a single-file mh_bundle. | 647 # to create a single-file mh_bundle. |
646 _types = { | 648 _types = { |
647 'executable': 'com.apple.product-type.tool', | 649 'executable': 'com.apple.product-type.tool', |
648 'loadable_module': 'com.googlecode.gyp.xcode.bundle', | 650 'loadable_module': 'com.googlecode.gyp.xcode.bundle', |
649 'shared_library': 'com.apple.product-type.library.dynamic', | 651 'shared_library': 'com.apple.product-type.library.dynamic', |
650 'static_library': 'com.apple.product-type.library.static', | 652 'static_library': 'com.apple.product-type.library.static', |
651 'executable+bundle': 'com.apple.product-type.application', | 653 'executable+bundle': 'com.apple.product-type.application', |
652 'loadable_module+bundle': 'com.apple.product-type.bundle', | 654 'loadable_module+bundle': 'com.apple.product-type.bundle', |
653 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test', | 655 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test', |
654 'shared_library+bundle': 'com.apple.product-type.framework', | 656 'shared_library+bundle': 'com.apple.product-type.framework', |
| 657 'extension+bundle': 'com.apple.product-type.app-extension', |
655 } | 658 } |
656 | 659 |
657 target_properties = { | 660 target_properties = { |
658 'buildConfigurationList': xccl, | 661 'buildConfigurationList': xccl, |
659 'name': target_name, | 662 'name': target_name, |
660 } | 663 } |
661 | 664 |
662 type = spec['type'] | 665 type = spec['type'] |
663 is_xctest = int(spec.get('mac_xctest_bundle', 0)) | 666 is_xctest = int(spec.get('mac_xctest_bundle', 0)) |
664 is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest | 667 is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 | 1230 |
1228 for build_file in build_files: | 1231 for build_file in build_files: |
1229 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) | 1232 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) |
1230 | 1233 |
1231 for build_file in build_files: | 1234 for build_file in build_files: |
1232 xcode_projects[build_file].Finalize2(xcode_targets, | 1235 xcode_projects[build_file].Finalize2(xcode_targets, |
1233 xcode_target_to_target_dict) | 1236 xcode_target_to_target_dict) |
1234 | 1237 |
1235 for build_file in build_files: | 1238 for build_file in build_files: |
1236 xcode_projects[build_file].Write() | 1239 xcode_projects[build_file].Write() |
OLD | NEW |