Remove scpack
This commit is contained in:
@ -1,42 +1,6 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os.path
|
||||
|
||||
# Build the packing binary garbage.
|
||||
scpack = AMXX.Program(builder, 'scpack')
|
||||
if builder.target_platform == 'windows':
|
||||
scpack.compiler.linkflags.remove('/SUBSYSTEM:WINDOWS')
|
||||
scpack.compiler.linkflags.append('/SUBSYSTEM:CONSOLE')
|
||||
scpack.sources = ['scpack.c']
|
||||
scpack = builder.Add(scpack)
|
||||
|
||||
# Generate pack files.
|
||||
packed_files = ['sc5', 'sc7']
|
||||
packed_includes = []
|
||||
for packed_file in packed_files:
|
||||
# The absolute path to sc5-in.scp etc.
|
||||
in_path = os.path.join(builder.currentSourcePath, '{0}-in.scp'.format(packed_file))
|
||||
|
||||
# The output file relative to the output folder, i.e. sourcepawn/compiler/sc5.scp.
|
||||
out_path = os.path.join(builder.buildFolder, '{0}.scp'.format(packed_file))
|
||||
|
||||
# The absolute path to the build folder, i.e. /Users/.../sourcepawn/compiler.
|
||||
build_folder = os.path.join(builder.buildPath, builder.buildFolder)
|
||||
|
||||
# scpack runs in ./sourcepawn/compiler/scpack/ so we build relative paths
|
||||
# from there.
|
||||
scpack_argv = [
|
||||
os.path.join(builder.buildPath, scpack.binary.path),
|
||||
os.path.relpath(in_path, build_folder),
|
||||
os.path.relpath(os.path.join(builder.buildPath, out_path), build_folder),
|
||||
]
|
||||
|
||||
_, (entry,) = builder.AddCommand(
|
||||
inputs = [scpack.binary, in_path],
|
||||
argv = scpack_argv,
|
||||
outputs = ['{0}.scp'.format(packed_file)],
|
||||
)
|
||||
packed_includes += [entry]
|
||||
|
||||
binary = AMXX.Library(builder, 'amxxpc32')
|
||||
|
||||
binary.compiler.includes += [
|
||||
@ -44,8 +8,6 @@ binary.compiler.includes += [
|
||||
os.path.join(builder.buildPath, builder.buildFolder),
|
||||
]
|
||||
|
||||
binary.compiler.sourcedeps += packed_includes
|
||||
|
||||
if builder.target_platform in ['mac', 'linux']:
|
||||
binary.compiler.defines += ['ENABLE_BINRELOC']
|
||||
binary.compiler.postlink += ['-lm', '-lpthread']
|
||||
@ -70,7 +32,6 @@ binary.sources = [
|
||||
'scstate.c',
|
||||
'sclist.c',
|
||||
'sci18n.c',
|
||||
'scexpand.c',
|
||||
'pawncc.c',
|
||||
'libpawnc.c',
|
||||
'prefix.c',
|
||||
|
Reference in New Issue
Block a user