SConscript (4042:dbd98b2264ed) SConscript (4045:43eb54e807d1)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 94 unchanged lines hidden (view full) ---

103 'swig/%s.i' % basename,
104 '$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
105 '-o ${TARGETS[0]} $SOURCES')
106 pyzip_dep_files.append('m5/internal/%s.py' % basename)
107
108swig_it('main')
109swig_it('debug')
110swig_it('event')
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 94 unchanged lines hidden (view full) ---

103 'swig/%s.i' % basename,
104 '$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
105 '-o ${TARGETS[0]} $SOURCES')
106 pyzip_dep_files.append('m5/internal/%s.py' % basename)
107
108swig_it('main')
109swig_it('debug')
110swig_it('event')
111swig_it('random')
111swig_it('trace')
112
113# Action function to build the zip archive. Uses the PyZipFile module
114# included in the standard Python library.
115def buildPyZip(target, source, env):
116 pzf = PyZipFile(str(target[0]), 'w')
117 for s in source:
118 pzf.writepy(str(s))
119
120# Add the zip file target to the environment.
121env.Command('m5py.zip', pyzip_files, buildPyZip)
122env.Depends('m5py.zip', pyzip_dep_files)
112swig_it('trace')
113
114# Action function to build the zip archive. Uses the PyZipFile module
115# included in the standard Python library.
116def buildPyZip(target, source, env):
117 pzf = PyZipFile(str(target[0]), 'w')
118 for s in source:
119 pzf.writepy(str(s))
120
121# Add the zip file target to the environment.
122env.Command('m5py.zip', pyzip_files, buildPyZip)
123env.Depends('m5py.zip', pyzip_dep_files)