Use == instead of is operator for checking string equality in AMBuild scripts (bug 6043, r=dvander).
This commit is contained in:
@@ -9,9 +9,9 @@ binary.compiler.includes += [
|
||||
]
|
||||
binary.compiler.defines += ['CURL_STATICLIB']
|
||||
binary.compiler.postlink += [libcurl.binary]
|
||||
if builder.target_platform is 'linux':
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += ['-lrt']
|
||||
elif builder.target_platform is 'windows':
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += ['ws2_32.lib']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -9,18 +9,18 @@ binary.compiler.includes += [
|
||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||
]
|
||||
|
||||
if builder.target_platform is 'mac':
|
||||
if builder.target_platform == 'mac':
|
||||
mac_version, ignore, ignore = platform.mac_ver()
|
||||
mac_tuple = mac_version.split('.')
|
||||
if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
|
||||
binary.compiler.defines += ['BUILTIN_STRLCAT']
|
||||
elif builder.target_platform is 'windows':
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.defines += [
|
||||
'BUILDING_LIBCURL',
|
||||
'CURL_STATICLIB',
|
||||
'CURL_DISABLE_LDAP',
|
||||
]
|
||||
elif builder.target_platform is 'linux':
|
||||
elif builder.target_platform == 'linux':
|
||||
binary.compiler.defines += ['_GNU_SOURCE']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import os
|
||||
|
||||
binary = SM.ExtLibrary(builder, 'geoip.ext')
|
||||
if builder.target_platform is 'windows':
|
||||
if builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += ['wsock32.lib']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -8,14 +8,14 @@ if SM.mysql_root:
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook')
|
||||
]
|
||||
|
||||
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
||||
if builder.target_platform == 'linux' or builder.target_platform == 'mac':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'libmysqlclient_r.a'),
|
||||
'-lz',
|
||||
'-lpthread',
|
||||
'-lm'
|
||||
]
|
||||
elif builder.target_platform is 'windows':
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += [
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'mysqlclient.lib'),
|
||||
os.path.join(SM.mysql_root, 'lib', 'opt', 'zlib.lib'),
|
||||
|
||||
@@ -6,11 +6,11 @@ binary.compiler.cxxincludes += [
|
||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||
]
|
||||
|
||||
if builder.target_platform is 'linux':
|
||||
if builder.target_platform == 'linux':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_linux', 'libpcre.a')
|
||||
elif builder.target_platform is 'windows':
|
||||
elif builder.target_platform == 'windows':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_win', 'pcre.lib')
|
||||
elif builder.target_platform is 'mac':
|
||||
elif builder.target_platform == 'mac':
|
||||
path = os.path.join(builder.sourcePath, 'extensions', 'regex', 'lib_darwin', 'libpcre.a')
|
||||
binary.compiler.postlink += [binary.Dep(path)]
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ for sdk_name in SM.sdks:
|
||||
binary.compiler.cxxincludes += [
|
||||
os.path.join(sdk.path, 'game', 'shared')
|
||||
]
|
||||
if binary.compiler.cxx.behavior is 'gcc':
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -14,7 +14,7 @@ for sdk_name in SM.sdks:
|
||||
if sdk.name != 'ep1':
|
||||
binary.compiler.defines += ['HOOKING_ENABLED']
|
||||
|
||||
if binary.compiler.cxx.behavior is 'gcc':
|
||||
if binary.compiler.cxx.behavior == 'gcc':
|
||||
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
@@ -10,7 +10,7 @@ binary.compiler.defines += [
|
||||
'SQLITE_OMIT_LOAD_EXTENSION',
|
||||
'SQLITE_THREADSAFE'
|
||||
]
|
||||
if builder.target_platform is 'linux':
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += ['-ldl', '-lpthread']
|
||||
|
||||
binary.sources += [
|
||||
|
||||
Reference in New Issue
Block a user