scons: Exclude parsetab.py when collecting python deps.

Because we don't have a good way to actually figure out what python
files we depend on, we have to use Glob and wildcard matching to depend
on all potential python files. Unfortunately that will pick up the
parsetab.py file that ply generates, which is a cached intermediate file
and not an input.

Change-Id: Id3dc0083e97c145deca04939182157623d6b780f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56341
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Gabe Black
2022-01-31 16:43:16 -08:00
parent 9e62fcf2bd
commit 00221a68bd

View File

@@ -104,7 +104,8 @@ SCons.Tool.SourceFileScanner.add_scanner('.cc.inc', SCons.Tool.CScanner)
# output from the ISA description (*.isa) files.
#
parser_files = Glob('isa_parser/*.py')
# parsetab.py is a file generated by PLY which we don't want to add as a dep.
parser_files = Glob('isa_parser/*.py', exclude=['*/parsetab.py'])
micro_asm_py = File('micro_asm.py')
# import ply here because SCons screws with sys.path when performing actions.