SConscript (2766:0844a9607f77) | SConscript (2921:e6bb350c3fa5) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2006 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 --- 126 unchanged lines hidden (view full) --- 135 136# The emitter patches up the sources & targets to include the 137# autogenerated files as targets and isa parser itself as a source. 138def isa_desc_emitter(target, source, env): 139 return (isa_desc_gen_files, [isa_parser, cpu_models_file] + source) 140 141# Pieces are in place, so create the builder. 142python = sys.executable # use same Python binary used to run scons | 1# -*- mode:python -*- 2 3# Copyright (c) 2006 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 --- 126 unchanged lines hidden (view full) --- 135 136# The emitter patches up the sources & targets to include the 137# autogenerated files as targets and isa parser itself as a source. 138def isa_desc_emitter(target, source, env): 139 return (isa_desc_gen_files, [isa_parser, cpu_models_file] + source) 140 141# Pieces are in place, so create the builder. 142python = sys.executable # use same Python binary used to run scons |
143isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS', 144 emitter = isa_desc_emitter) | |
145 | 143 |
144# Also include the CheckerCPU as one of the models if it is being 145# enabled via command line. 146if env['USE_CHECKER']: 147 isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS CheckerCPU', 148 emitter = isa_desc_emitter) 149else: 150 isa_desc_builder = Builder(action=python + ' $SOURCES $TARGET.dir $CPU_MODELS', 151 emitter = isa_desc_emitter) 152 |
|
146env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder }) 147 148# 149# Now include other ISA-specific sources from the ISA subdirectories. 150# 151 152isa = env['TARGET_ISA'] # someday this may be a list of ISAs 153 154# Let the target architecture define what additional sources it needs 155sources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env') 156 157Return('sources') | 153env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder }) 154 155# 156# Now include other ISA-specific sources from the ISA subdirectories. 157# 158 159isa = env['TARGET_ISA'] # someday this may be a list of ISAs 160 161# Let the target architecture define what additional sources it needs 162sources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env') 163 164Return('sources') |