From 4a3ad218e1a41a9fa655471b999e2540e4e78448 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 9 Mar 2005 14:39:35 -0500 Subject: [PATCH] We should import m5config *after* we do the CPPDEFINES stuff, otherwise m5config and the object descriptions cannot take advantage of them. sim/pyconfig/SConscript: We should import m5config *after* we do the CPPDEFINES stuff, otherwise m5config and the object descriptions cannot take advantage of them. This means that we can't use the env dict alias. We should instead use os.environ. --HG-- extra : convert_revision : 392f99a3c15cfba74a5cde79a709ecfad3820e63 --- sim/pyconfig/SConscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sim/pyconfig/SConscript b/sim/pyconfig/SConscript index 95785d372..2799ef64f 100644 --- a/sim/pyconfig/SConscript +++ b/sim/pyconfig/SConscript @@ -147,6 +147,7 @@ def MakeEmbeddedPyFile(target, source, env): def MakeDefinesPyFile(target, source, env): target = file(str(target[0]), 'w') + print >>target, "import os" defines = env['CPPDEFINES'] if isinstance(defines, list): for var in defines: @@ -158,11 +159,11 @@ def MakeDefinesPyFile(target, source, env): if not isinstance(key, basestring): panic("invalid type for define: %s" % type(key)) - print >>target, "env['%s'] = '%s'" % (key, val) + print >>target, "os.environ['%s'] = '%s'" % (key, val) elif isinstance(defines, dict): for key,val in defines.iteritems(): - print >>target, "env['%s'] = '%s'" % (key, val) + print >>target, "os.environ['%s'] = '%s'" % (key, val) else: panic("invalid type for defines: %s" % type(defines)) -- 2.30.2