Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: pylib/gyp/xcode_emulation.py

Issue 10898022: mac ninja&make: Expose SDKROOT to the environment. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mac/sdkroot/test.gyp » ('j') | test/mac/sdkroot/test_shorthand.sh » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/mac/sdkroot/test.gyp » ('j') | test/mac/sdkroot/test_shorthand.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698