summaryrefslogtreecommitdiff
path: root/sim/pyconfig/SConscript
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-02-02 21:13:01 -0500
committerNathan Binkert <binkertn@umich.edu>2005-02-02 21:13:01 -0500
commita736a8fab6dd1ae0d5546939bc0c7fc4aec003e8 (patch)
tree8843b82f22ad52deb3b85599cca52b93b6367c35 /sim/pyconfig/SConscript
parent45bb2bf14d501f4ccab0bb399f53f8b35f8c82e6 (diff)
downloadgem5-a736a8fab6dd1ae0d5546939bc0c7fc4aec003e8.tar.xz
Update config file language to take simobj and no longer use siminst
objects/AlphaConsole.mpy: objects/AlphaTLB.mpy: objects/BadDevice.mpy: objects/BaseCPU.mpy: objects/BaseCache.mpy: objects/BaseSystem.mpy: objects/Bus.mpy: objects/CoherenceProtocol.mpy: objects/Device.mpy: objects/DiskImage.mpy: objects/Ethernet.mpy: objects/Ide.mpy: objects/IntrControl.mpy: objects/MemTest.mpy: objects/Pci.mpy: objects/PhysicalMemory.mpy: objects/Platform.mpy: objects/Process.mpy: objects/Repl.mpy: objects/Root.mpy: objects/SimConsole.mpy: objects/SimpleDisk.mpy: objects/Tsunami.mpy: objects/Uart.mpy: simobj now requires a type= line if it is actually intended to be a type sim/pyconfig/SConscript: keep track of the filename of embedded files for better error messages. sim/pyconfig/m5config.py: Add support for the trickery done with the compiler to get the simobj language feature added to the importer. fix the bug that gave objects the wrong name in error messages. test/genini.py: Globals have been fixed and use execfile --HG-- extra : convert_revision : b74495fd6f3479a87ecea7f1234ebb6731279b2b
Diffstat (limited to 'sim/pyconfig/SConscript')
-rw-r--r--sim/pyconfig/SConscript15
1 files changed, 8 insertions, 7 deletions
diff --git a/sim/pyconfig/SConscript b/sim/pyconfig/SConscript
index 127b0efae..5708ac9a8 100644
--- a/sim/pyconfig/SConscript
+++ b/sim/pyconfig/SConscript
@@ -28,14 +28,15 @@
import os, os.path, re
-def WriteEmbeddedPyFile(target, source, path, name, ext):
+def WriteEmbeddedPyFile(target, source, path, name, ext, filename):
if isinstance(source, str):
source = file(source, 'r')
if isinstance(target, str):
target = file(target, 'w')
- print >>target, "AddModule(%s, %s, %s, '''\\" % (`path`, `name`, `ext`)
+ print >>target, "AddModule(%s, %s, %s, %s, '''\\" % \
+ (`path`, `name`, `ext`, `filename`)
for line in source:
line = line
@@ -105,7 +106,7 @@ def MakeEmbeddedPyFile(target, source, env):
name,ext = pyfile.split('.')
if name == '__init__':
node['.hasinit'] = True
- node[pyfile] = (src,name,ext)
+ node[pyfile] = (src,name,ext,src)
done = False
while not done:
@@ -136,12 +137,12 @@ def MakeEmbeddedPyFile(target, source, env):
raise NameError, 'package directory missing __init__.py'
populate(entry, path + [ name ])
else:
- pyfile,name,ext = entry
- files.append((pyfile, path, name, ext))
+ pyfile,name,ext,filename = entry
+ files.append((pyfile, path, name, ext, filename))
populate(tree)
- for pyfile, path, name, ext in files:
- WriteEmbeddedPyFile(target, pyfile, path, name, ext)
+ for pyfile, path, name, ext, filename in files:
+ WriteEmbeddedPyFile(target, pyfile, path, name, ext, filename)
CFileCounter = 0
def MakePythonCFile(target, source, env):