From 6bc047b26baed6799c8ef40922e2b5d80a0c170a Mon Sep 17 00:00:00 2001 From: Arne de Bruijn Date: Sun, 16 Apr 2023 09:56:44 +0200 Subject: [PATCH] Fix SConstruct for scons 4.5+ In scons 4.5+ env['CPPDEFINES'] can sometimes return a deque object. See SCons/scons#4321 --- d1/SConstruct | 2 +- d2/SConstruct | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d1/SConstruct b/d1/SConstruct index 68761ffc..345f2ab9 100644 --- a/d1/SConstruct +++ b/d1/SConstruct @@ -371,7 +371,7 @@ class DXXProgram(DXXCommon): objects = [self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, os.path.splitext(s)[0], self.env["OBJSUFFIX"]), source=s) for s in self.common_sources] objects.extend(self.platform_settings.platform_objects) objects.extend(program_specific_objects) - versid_cppdefines=env['CPPDEFINES'][:] + versid_cppdefines=list(env['CPPDEFINES']) if self.user_settings.extra_version: versid_cppdefines.append(('DESCENT_VERSION_EXTRA', '\\"%s\\"' % self.user_settings.extra_version)) objects.append(self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, 'main/vers_id', self.env["OBJSUFFIX"]), source='main/vers_id.c', CPPDEFINES=versid_cppdefines)) diff --git a/d2/SConstruct b/d2/SConstruct index fce82f99..370c5064 100644 --- a/d2/SConstruct +++ b/d2/SConstruct @@ -372,7 +372,7 @@ class DXXProgram(DXXCommon): objects = [self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, os.path.splitext(s)[0], self.env["OBJSUFFIX"]), source=s) for s in self.common_sources] objects.extend(self.platform_settings.platform_objects) objects.extend(program_specific_objects) - versid_cppdefines=env['CPPDEFINES'][:] + versid_cppdefines=list(env['CPPDEFINES']) if self.user_settings.program_name: exe_target = self.user_settings.program_name if self.user_settings.extra_version: