aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcomex2015-08-17 01:52:11 -0400
committercomex2015-08-17 01:55:06 -0400
commitc99b238cec2e3ec89774dd1dcc4c352d026d8100 (patch)
treeebc651eb8eed234141389709f726d1210bbd27ea
parentstuff (diff)
downloadsubstitute-c99b238cec2e3ec89774dd1dcc4c352d026d8100.tar.gz
mconfig quick fixes
-rwxr-xr-xconfigure4
-rw-r--r--script/mconfig.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index ff6ec33..5522ac4 100755
--- a/configure
+++ b/configure
@@ -47,6 +47,8 @@ for name, cflags in asm_archs:
def wrong_ios():
if settings.enable_ios_bootstrap and not settings.host_machine().is_ios():
raise mconfig.DependencyNotFoundException("iOS bootstrap requires iOS, but the target doesn't seem to be iOS - if you're compiling without Xcode, please specify --target=armv7-apple-darwin10 or something like that")
+mconfig.post_parse_args_will_need.append(wrong_ios)
+
mconfig.parse_args()
####################################
@@ -191,7 +193,7 @@ if settings.enable_tests:
ibase = obase = tup.pop(0)
cflags = ldflags = []
options = {}
- if tup and isinstance(tup[0], basestring): ibase = tup.pop(0)
+ if tup and isinstance(tup[0], str): ibase = tup.pop(0)
if tup and isinstance(tup[0], (list, tuple)): cflags = tup.pop(0)
if tup and isinstance(tup[0], (list, tuple)): ldflags = tup.pop(0)
if tup: options, = tup
diff --git a/script/mconfig.py b/script/mconfig.py
index 179218c..d025545 100644
--- a/script/mconfig.py
+++ b/script/mconfig.py
@@ -503,7 +503,7 @@ class Machine(object):
if not self.is_darwin():
return False
tc = self.darwin_target_conditionals()
- return tc['TARGET_OS_IOS'] or tc['TARGET_OS_SIMULATOR']
+ return any(tc.get(flag) for flag in ['TARGET_OS_IOS', 'TARGET_OS_SIMULATOR', 'TARGET_OS_IPHONE', 'TARGET_IPHONE_SIMULATOR'])
def is_macosx(self):
return self.is_darwin() and not self.is_ios()
@@ -621,6 +621,8 @@ class UnixToolchain(object):
return tool.locate_in_paths(prefix, self.settings.tool_search_paths)
def calc_darwin_target_conditionals(ctools, settings):
+ if not os.path.exists(settings.out):
+ os.makedirs(settings.out)
fn = os.path.join(settings.out, '_calc_darwin_target_conditionals.c')
with open(fn, 'w') as fp:
fp.write('#include <TargetConditionals.h>\n')