SConscript (10467:dcf27c8220ac) | SConscript (10584:babb40bd2fc6) |
---|---|
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 ] | 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) |
|
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 | 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 |
720 for simobj in sorted(sim_objects.itervalues()) | 721 for name,simobj in sorted(sim_objects.iteritems()) |
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 = [] | 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 = [] |
728for name,param in params_to_swig.iteritems(): | 729for name,param in sorted(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 | 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 |
763for name,simobj in sim_objects.iteritems(): | 764for name,simobj in sorted(sim_objects.iteritems()): |
764 py_source = PySource.modules[simobj.__module__] 765 extra_deps = [ py_source.tnode ] | 765 py_source = PySource.modules[simobj.__module__] 766 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 --- | 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 --- |