| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 from SCons.Errors import UserError | 6 from SCons.Errors import UserError |
| 7 | 7 |
| 8 Import('env') | 8 Import('env') |
| 9 | 9 |
| 10 # | 10 # |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 dfa_gen_actions, | 142 dfa_gen_actions, |
| 143 # pass inst defs as remaining parameters | 143 # pass inst defs as remaining parameters |
| 144 ' '.join('${SOURCES[%d]}' % (i + 1) | 144 ' '.join('${SOURCES[%d]}' % (i + 1) |
| 145 for i in range(len(INST_DEFS))) | 145 for i in range(len(INST_DEFS))) |
| 146 ) | 146 ) |
| 147 ) | 147 ) |
| 148 c_file = '%s_x86_%s.c' % (automaton, bits) | 148 c_file = '%s_x86_%s.c' % (automaton, bits) |
| 149 c_full_filename = '%s/%s' % (val_src_dir, c_file) | 149 c_full_filename = '%s/%s' % (val_src_dir, c_file) |
| 150 env.Command( | 150 env.Command( |
| 151 target=c_file, | 151 target=c_file, |
| 152 source=['unreviewed/%s_x86_%s.rl' % (automaton, bits), | 152 source=['%s_x86_%s.rl' % (automaton, bits), |
| 153 '%s/byte_machines.rl' % rl_src_dir, | 153 '%s/byte_machines.rl' % rl_src_dir, |
| 154 'unreviewed/parse_instruction.rl', | 154 'unreviewed/parse_instruction.rl', |
| 155 rl_file], | 155 rl_file], |
| 156 action=['%s %s -LL -I.. -I%s ${SOURCES[0]} -o ${TARGET}' % ( | 156 action=['%s %s -LL -I.. -I%s ${SOURCES[0]} -o ${TARGET}' % ( |
| 157 ragel_binary, ragel_flags, rl_src_dir)] | 157 ragel_binary, ragel_flags, rl_src_dir)] |
| 158 ) | 158 ) |
| 159 | 159 |
| 160 def InjectGeneratedFileHeader(target, source, env): | 160 def InjectGeneratedFileHeader(target, source, env): |
| 161 source_filename = source[0].get_abspath() | 161 source_filename = source[0].get_abspath() |
| 162 target_filename = target[0].get_abspath() | 162 target_filename = target[0].get_abspath() |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 '"${SOURCES[5]}" "%s"' | 305 '"${SOURCES[5]}" "%s"' |
| 306 ) % (bits, fast_temp_for_test), | 306 ) % (bits, fast_temp_for_test), |
| 307 ]) | 307 ]) |
| 308 check_decoders.append(check_decoder) | 308 check_decoders.append(check_decoder) |
| 309 | 309 |
| 310 SideEffect(fast_temp_for_test, check_decoders) | 310 SideEffect(fast_temp_for_test, check_decoders) |
| 311 | 311 |
| 312 env.AlwaysBuild(env.Alias('dfagen', automata)) | 312 env.AlwaysBuild(env.Alias('dfagen', automata)) |
| 313 env.AlwaysBuild(env.Alias('dfaclean', action=map(Delete, automata))) | 313 env.AlwaysBuild(env.Alias('dfaclean', action=map(Delete, automata))) |
| 314 env.AlwaysBuild(env.Alias('dfacheckdecoder', check_decoders)) | 314 env.AlwaysBuild(env.Alias('dfacheckdecoder', check_decoders)) |
| OLD | NEW |