Remove arch loops from build scripts. (#889)
This simplifies non-sdk build scripts by removing their loops over SM.archs. Instead the top-level build script will re-evaluate them for each architecture.
This commit is contained in:
parent
6ad6abd319
commit
7ed329c11f
@ -639,32 +639,40 @@ for arch in SM.archs:
|
|||||||
SP.libsourcepawn[arch]
|
SP.libsourcepawn[arch]
|
||||||
]
|
]
|
||||||
|
|
||||||
BuildScripts = [
|
NonSDKBuilds = [
|
||||||
'loader/AMBuilder',
|
|
||||||
'core/AMBuilder',
|
|
||||||
'core/logic/AMBuilder',
|
'core/logic/AMBuilder',
|
||||||
'extensions/bintools/AMBuilder',
|
'extensions/bintools/AMBuilder',
|
||||||
'extensions/clientprefs/AMBuilder',
|
'extensions/clientprefs/AMBuilder',
|
||||||
'extensions/curl/AMBuilder',
|
'extensions/curl/AMBuilder',
|
||||||
'extensions/cstrike/AMBuilder',
|
|
||||||
'extensions/geoip/AMBuilder',
|
'extensions/geoip/AMBuilder',
|
||||||
'extensions/mysql/AMBuilder',
|
|
||||||
'extensions/regex/AMBuilder',
|
'extensions/regex/AMBuilder',
|
||||||
'extensions/sdkhooks/AMBuilder',
|
|
||||||
'extensions/sdktools/AMBuilder',
|
|
||||||
'extensions/sqlite/AMBuilder',
|
'extensions/sqlite/AMBuilder',
|
||||||
'extensions/tf2/AMBuilder',
|
|
||||||
'extensions/topmenus/AMBuilder',
|
'extensions/topmenus/AMBuilder',
|
||||||
'extensions/updater/AMBuilder',
|
'extensions/updater/AMBuilder',
|
||||||
|
'loader/AMBuilder',
|
||||||
]
|
]
|
||||||
|
if SM.mysql_root:
|
||||||
|
NonSDKBuilds += [
|
||||||
|
'extensions/mysql/AMBuilder',
|
||||||
|
]
|
||||||
|
for arch in SM.archs:
|
||||||
|
builder.Build(NonSDKBuilds, { 'SM': SM, 'arch': arch })
|
||||||
|
|
||||||
|
SDKBuilds = [
|
||||||
|
'core/AMBuilder',
|
||||||
|
'extensions/cstrike/AMBuilder',
|
||||||
|
'extensions/sdkhooks/AMBuilder',
|
||||||
|
'extensions/sdktools/AMBuilder',
|
||||||
|
'extensions/tf2/AMBuilder',
|
||||||
|
]
|
||||||
|
builder.Build(SDKBuilds, { 'SM': SM })
|
||||||
|
|
||||||
if builder.backend == 'amb2':
|
if builder.backend == 'amb2':
|
||||||
BuildScripts += [
|
OtherScripts = [
|
||||||
'plugins/AMBuilder',
|
'plugins/AMBuilder',
|
||||||
'tools/buildbot/PackageScript',
|
'tools/buildbot/PackageScript',
|
||||||
]
|
]
|
||||||
|
builder.Build(OtherScripts, { 'SM': SM })
|
||||||
builder.Build(BuildScripts, { 'SM': SM })
|
|
||||||
|
|
||||||
if builder.options.breakpad_dump:
|
if builder.options.breakpad_dump:
|
||||||
builder.Build('tools/buildbot/BreakpadSymbols', { 'SM': SM })
|
builder.Build('tools/buildbot/BreakpadSymbols', { 'SM': SM })
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.Library(builder, 'sourcemod.logic', arch)
|
binary = SM.Library(builder, 'sourcemod.logic', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
builder.sourcePath,
|
builder.sourcePath,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'bintools.ext', arch)
|
binary = SM.ExtLibrary(builder, 'bintools.ext', arch)
|
||||||
binary.compiler.defines += ['HOOKING_ENABLED']
|
binary.compiler.defines += ['HOOKING_ENABLED']
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
@ -27,4 +26,3 @@ for arch in SM.archs:
|
|||||||
binary.sources += ['jit_call.cpp']
|
binary.sources += ['jit_call.cpp']
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'clientprefs.ext', arch)
|
binary = SM.ExtLibrary(builder, 'clientprefs.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||||
@ -21,4 +20,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
libcurl = builder.Build('curl-src/lib/AMBuilder')
|
libcurl = builder.Build('curl-src/lib/AMBuilder')
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'webternet.ext', arch)
|
binary = SM.ExtLibrary(builder, 'webternet.ext', arch)
|
||||||
binary.compiler.includes += [
|
binary.compiler.includes += [
|
||||||
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
os.path.join(builder.sourcePath, 'extensions', 'curl', 'curl-src', 'include')
|
||||||
@ -25,4 +25,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'geoip.ext', arch)
|
binary = SM.ExtLibrary(builder, 'geoip.ext', arch)
|
||||||
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||||
binary.compiler.cxxflags += ['-fno-rtti']
|
binary.compiler.cxxflags += ['-fno-rtti']
|
||||||
@ -17,4 +16,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
if SM.mysql_root:
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext', arch)
|
binary = SM.ExtLibrary(builder, 'dbi.mysql.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mysql_root[arch], 'include'),
|
os.path.join(SM.mysql_root[arch], 'include'),
|
||||||
@ -45,4 +43,3 @@ if SM.mysql_root:
|
|||||||
binary.compiler.defines += ['HAVE_STRUCT_TIMESPEC']
|
binary.compiler.defines += ['HAVE_STRUCT_TIMESPEC']
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'regex.ext', arch)
|
binary = SM.ExtLibrary(builder, 'regex.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||||
@ -32,4 +31,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext', arch)
|
binary = SM.ExtLibrary(builder, 'dbi.sqlite.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||||
@ -31,4 +30,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'topmenus.ext', arch)
|
binary = SM.ExtLibrary(builder, 'topmenus.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os
|
import os
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
binary = SM.ExtLibrary(builder, 'updater.ext', arch)
|
binary = SM.ExtLibrary(builder, 'updater.ext', arch)
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
os.path.join(SM.mms_root, 'core', 'sourcehook'),
|
||||||
@ -20,4 +19,3 @@ for arch in SM.archs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
SM.extensions += [builder.Add(binary)]
|
SM.extensions += [builder.Add(binary)]
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
for arch in SM.archs:
|
|
||||||
if builder.target.platform in ['windows', 'mac']:
|
if builder.target.platform in ['windows', 'mac']:
|
||||||
name = 'sourcemod_mm'
|
name = 'sourcemod_mm'
|
||||||
extra_ldflags = []
|
extra_ldflags = []
|
||||||
|
Loading…
Reference in New Issue
Block a user