Deleted Added
sdiff udiff text old ( 10467:dcf27c8220ac ) new ( 10584:babb40bd2fc6 )
full compact
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 ]
531
532########################################################################
533#
534# Commands for the basic automatically generated python files
535#
536
537# Generate Python file containing a dict specifying the current
538# buildEnv flags.

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

712 code('}')
713 code.write(target[0].abspath)
714
715 py_source = PySource.modules[simobj.__module__]
716 extra_deps = [ py_source.tnode ]
717 env.Command(cxx_config_init_cc_file, Value(name),
718 MakeAction(createCxxConfigInitCC, Transform("CXXCINIT")))
719 cxx_param_hh_files = ["cxx_config/%s.hh" % simobj
720 for simobj in sorted(sim_objects.itervalues())
721 if not hasattr(simobj, 'abstract') or not simobj.abstract]
722 Depends(cxx_config_init_cc_file, cxx_param_hh_files +
723 [File('sim/cxx_config.hh')])
724 Source(cxx_config_init_cc_file)
725
726# Generate any needed param SWIG wrapper files
727params_i_files = []
728for name,param in params_to_swig.iteritems():
729 i_file = File('python/m5/internal/%s.i' % (param.swig_module_name()))
730 params_i_files.append(i_file)
731 env.Command(i_file, Value(name),
732 MakeAction(createParamSwigWrapper, Transform("SW PARAM")))
733 env.Depends(i_file, depends)
734 env.Depends(SWIG, i_file)
735 SwigSource('m5.internal', i_file)
736

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

755 i_file = File('python/m5/internal/enum_%s.i' % name)
756 env.Command(i_file, Value(name),
757 MakeAction(createEnumSwigWrapper, Transform("ENUMSWIG")))
758 env.Depends(i_file, depends + extra_deps)
759 env.Depends(SWIG, i_file)
760 SwigSource('m5.internal', i_file)
761
762# Generate SimObject SWIG wrapper files
763for name,simobj in sim_objects.iteritems():
764 py_source = PySource.modules[simobj.__module__]
765 extra_deps = [ py_source.tnode ]
766
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 ---