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 """ | 5 """ |
6 This module contains classes that help to emulate xcodebuild behavior on top of | 6 This module contains classes that help to emulate xcodebuild behavior on top of |
7 other build systems, such as make and ninja. | 7 other build systems, such as make and ninja. |
8 """ | 8 """ |
9 | 9 |
10 import gyp.common | 10 import gyp.common |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 'CONFIGURATION' : configuration, | 932 'CONFIGURATION' : configuration, |
933 'PRODUCT_NAME' : xcode_settings.GetProductName(), | 933 'PRODUCT_NAME' : xcode_settings.GetProductName(), |
934 # See /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifica
tions/MacOSX\ Product\ Types.xcspec for FULL_PRODUCT_NAME | 934 # See /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifica
tions/MacOSX\ Product\ Types.xcspec for FULL_PRODUCT_NAME |
935 'SRCROOT' : srcroot, | 935 'SRCROOT' : srcroot, |
936 'SOURCE_ROOT': '${SRCROOT}', | 936 'SOURCE_ROOT': '${SRCROOT}', |
937 # This is not true for static libraries, but currently the env is only | 937 # This is not true for static libraries, but currently the env is only |
938 # written for bundles: | 938 # written for bundles: |
939 'TARGET_BUILD_DIR' : built_products_dir, | 939 'TARGET_BUILD_DIR' : built_products_dir, |
940 'TEMP_DIR' : '${TMPDIR}', | 940 'TEMP_DIR' : '${TMPDIR}', |
941 } | 941 } |
| 942 if xcode_settings.GetPerTargetSetting('SDKROOT'): |
| 943 env['SDKROOT'] = xcode_settings._SdkPath() |
| 944 else: |
| 945 env['SDKROOT'] = '' |
| 946 |
942 if spec['type'] in ( | 947 if spec['type'] in ( |
943 'executable', 'static_library', 'shared_library', 'loadable_module'): | 948 'executable', 'static_library', 'shared_library', 'loadable_module'): |
944 env['EXECUTABLE_NAME'] = xcode_settings.GetExecutableName() | 949 env['EXECUTABLE_NAME'] = xcode_settings.GetExecutableName() |
945 env['EXECUTABLE_PATH'] = xcode_settings.GetExecutablePath() | 950 env['EXECUTABLE_PATH'] = xcode_settings.GetExecutablePath() |
946 env['FULL_PRODUCT_NAME'] = xcode_settings.GetFullProductName() | 951 env['FULL_PRODUCT_NAME'] = xcode_settings.GetFullProductName() |
947 mach_o_type = xcode_settings.GetMachOType() | 952 mach_o_type = xcode_settings.GetMachOType() |
948 if mach_o_type: | 953 if mach_o_type: |
949 env['MACH_O_TYPE'] = mach_o_type | 954 env['MACH_O_TYPE'] = mach_o_type |
950 env['PRODUCT_TYPE'] = xcode_settings.GetProductType() | 955 env['PRODUCT_TYPE'] = xcode_settings.GetProductType() |
951 if xcode_settings._IsBundle(): | 956 if xcode_settings._IsBundle(): |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 def GetSpecPostbuildCommands(spec, quiet=False): | 1056 def GetSpecPostbuildCommands(spec, quiet=False): |
1052 """Returns the list of postbuilds explicitly defined on |spec|, in a form | 1057 """Returns the list of postbuilds explicitly defined on |spec|, in a form |
1053 executable by a shell.""" | 1058 executable by a shell.""" |
1054 postbuilds = [] | 1059 postbuilds = [] |
1055 for postbuild in spec.get('postbuilds', []): | 1060 for postbuild in spec.get('postbuilds', []): |
1056 if not quiet: | 1061 if not quiet: |
1057 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( | 1062 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( |
1058 spec['target_name'], postbuild['postbuild_name'])) | 1063 spec['target_name'], postbuild['postbuild_name'])) |
1059 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) | 1064 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) |
1060 return postbuilds | 1065 return postbuilds |
OLD | NEW |