Deleted Added
sdiff udiff text old ( 11993:a10174523d53 ) new ( 11996:b71e950a8bd0 )
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

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

625 obj = sim_objects[name]
626
627 code = code_formatter()
628 obj.cxx_config_param_file(code, is_header)
629 code.write(target[0].abspath)
630 return body
631
632def createEnumStrings(target, source, env):
633 assert len(target) == 1 and len(source) == 1
634
635 name = str(source[0].get_contents())
636 obj = all_enums[name]
637
638 code = code_formatter()
639 obj.cxx_def(code)
640 if env['USE_PYTHON']:
641 obj.pybind_def(code)
642 code.write(target[0].abspath)
643
644def createEnumDecls(target, source, env):
645 assert len(target) == 1 and len(source) == 1
646
647 name = str(source[0].get_contents())
648 obj = all_enums[name]

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

727 Source(cxx_config_init_cc_file)
728
729# Generate all enum header files
730for name,enum in sorted(all_enums.iteritems()):
731 py_source = PySource.modules[enum.__module__]
732 extra_deps = [ py_source.tnode ]
733
734 cc_file = File('enums/%s.cc' % name)
735 env.Command(cc_file, Value(name),
736 MakeAction(createEnumStrings, Transform("ENUM STR")))
737 env.Depends(cc_file, depends + extra_deps)
738 Source(cc_file)
739
740 hh_file = File('enums/%s.hh' % name)
741 env.Command(hh_file, Value(name),
742 MakeAction(createEnumDecls, Transform("ENUMDECL")))
743 env.Depends(hh_file, depends + extra_deps)

--- 502 unchanged lines hidden ---