diff options
author | Kevin Lim <ktlim@umich.edu> | 2005-02-04 18:25:49 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2005-02-04 18:25:49 -0500 |
commit | 1e7a744c09d0bde70e0f83179fdf4d6059585e4b (patch) | |
tree | 9bbc7713c4bb79abb3f76b07547d8822f0557caa /sim/pyconfig/SConscript | |
parent | c389c2e327cc3ee1c988855b05505660c6670172 (diff) | |
parent | b78d7c2f16dac11ed468de45a088a362605c6493 (diff) | |
download | gem5-1e7a744c09d0bde70e0f83179fdf4d6059585e4b.tar.xz |
Hand merge
--HG--
extra : convert_revision : 86c7399b79c17558041a73056745227f70fe8b3b
Diffstat (limited to 'sim/pyconfig/SConscript')
-rw-r--r-- | sim/pyconfig/SConscript | 15 |
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): |