SConscript revision 1046
14997Sgblack@eecs.umich.edu# -*- mode:python -*- 25268Sksewell@umich.edu 35254Sksewell@umich.edu# Copyright (c) 2004 The Regents of The University of Michigan 45254Sksewell@umich.edu# All rights reserved. 54997Sgblack@eecs.umich.edu# 65254Sksewell@umich.edu# Redistribution and use in source and binary forms, with or without 75254Sksewell@umich.edu# modification, are permitted provided that the following conditions are 85254Sksewell@umich.edu# met: redistributions of source code must retain the above copyright 95254Sksewell@umich.edu# notice, this list of conditions and the following disclaimer; 105254Sksewell@umich.edu# redistributions in binary form must reproduce the above copyright 115254Sksewell@umich.edu# notice, this list of conditions and the following disclaimer in the 125254Sksewell@umich.edu# documentation and/or other materials provided with the distribution; 135254Sksewell@umich.edu# neither the name of the copyright holders nor the names of its 145254Sksewell@umich.edu# contributors may be used to endorse or promote products derived from 155254Sksewell@umich.edu# this software without specific prior written permission. 164997Sgblack@eecs.umich.edu# 175254Sksewell@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 185254Sksewell@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 195254Sksewell@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 205254Sksewell@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 215254Sksewell@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 225254Sksewell@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 235254Sksewell@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 245254Sksewell@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 255254Sksewell@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 265254Sksewell@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 275254Sksewell@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 284997Sgblack@eecs.umich.edu 295268Sksewell@umich.eduimport os 305268Sksewell@umich.edu 315268Sksewell@umich.eduImport('env', 'obj_desc_files') 324997Sgblack@eecs.umich.edu 334997Sgblack@eecs.umich.edumy_obj_desc_files = map(lambda x: '../../' + x, obj_desc_files) 345222Sksewell@umich.edu 355222Sksewell@umich.eduenv.Command('m5odescs.py', my_obj_desc_files, 364997Sgblack@eecs.umich.edu '$TARGET.srcdir/load_odescs.py $_CPPDEFFLAGS $SOURCES $TARGET') 375222Sksewell@umich.edu 385222Sksewell@umich.edu# Python modules to encapsulate 394997Sgblack@eecs.umich.edustring_module_bases = Split('m5config m5configbase m5odescs') 405222Sksewell@umich.edustring_modules = map(lambda x: x + '_as_string.py', string_module_bases) 415222Sksewell@umich.edu 425222Sksewell@umich.edufor m in string_module_bases: 435222Sksewell@umich.edu env.Command(m + '_as_string.py', m + '.py', 445222Sksewell@umich.edu '$TARGET.srcdir/make_string_module.py $SOURCE $TARGET') 455222Sksewell@umich.edu 465224Sksewell@umich.eduembedded_py_files = Split('string_importer.py') + string_modules 475224Sksewell@umich.edu 485222Sksewell@umich.eduenv.Command('code.cc', embedded_py_files, 495222Sksewell@umich.edu '$TARGET.srcdir/make_c_file.py pyconfig_code $SOURCES $TARGET') 505222Sksewell@umich.edu 515222Sksewell@umich.edu