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 --- 514 unchanged lines hidden (view full) --- 523 params_to_swig[pname] = param 524 525######################################################################## 526# 527# calculate extra dependencies 528# 529module_depends = ["m5", "m5.SimObject", "m5.params"] 530depends = [ PySource.modules[dep].snode for dep in module_depends ] |
531depends.sort(key = lambda x: x.name) |
532 533######################################################################## 534# 535# Commands for the basic automatically generated python files 536# 537 538# Generate Python file containing a dict specifying the current 539# buildEnv flags. --- 173 unchanged lines hidden (view full) --- 713 code('}') 714 code.write(target[0].abspath) 715 716 py_source = PySource.modules[simobj.__module__] 717 extra_deps = [ py_source.tnode ] 718 env.Command(cxx_config_init_cc_file, Value(name), 719 MakeAction(createCxxConfigInitCC, Transform("CXXCINIT"))) 720 cxx_param_hh_files = ["cxx_config/%s.hh" % simobj |
721 for name,simobj in sorted(sim_objects.iteritems()) |
722 if not hasattr(simobj, 'abstract') or not simobj.abstract] 723 Depends(cxx_config_init_cc_file, cxx_param_hh_files + 724 [File('sim/cxx_config.hh')]) 725 Source(cxx_config_init_cc_file) 726 727# Generate any needed param SWIG wrapper files 728params_i_files = [] |
729for name,param in sorted(params_to_swig.iteritems()): |
730 i_file = File('python/m5/internal/%s.i' % (param.swig_module_name())) 731 params_i_files.append(i_file) 732 env.Command(i_file, Value(name), 733 MakeAction(createParamSwigWrapper, Transform("SW PARAM"))) 734 env.Depends(i_file, depends) 735 env.Depends(SWIG, i_file) 736 SwigSource('m5.internal', i_file) 737 --- 18 unchanged lines hidden (view full) --- 756 i_file = File('python/m5/internal/enum_%s.i' % name) 757 env.Command(i_file, Value(name), 758 MakeAction(createEnumSwigWrapper, Transform("ENUMSWIG"))) 759 env.Depends(i_file, depends + extra_deps) 760 env.Depends(SWIG, i_file) 761 SwigSource('m5.internal', i_file) 762 763# Generate SimObject SWIG wrapper files |
764for name,simobj in sorted(sim_objects.iteritems()): |
765 py_source = PySource.modules[simobj.__module__] 766 extra_deps = [ py_source.tnode ] |
767 i_file = File('python/m5/internal/param_%s.i' % name) 768 env.Command(i_file, Value(name), 769 MakeAction(createSimObjectSwigWrapper, Transform("SO SWIG"))) 770 env.Depends(i_file, depends + extra_deps) 771 SwigSource('m5.internal', i_file) 772 773# Generate the main swig init file 774def makeEmbeddedSwigInit(target, source, env): --- 504 unchanged lines hidden --- |