Hi!
I am trying to get an list off all the included files recursively from an System Verilog top file which is not something that you support directly as I can see.
That is from an single system Verilog file I would like to get all the files that would be read while doing an normal compilations.
One use case for this is to create make targets which depends on all the included files.
My idea is in to have an script and in that run
verible-verilog-syntax --printtree --export_json
top.svAnd from that returned json tree recursively run the same command on all included files.
One problem is that we some times uses `ifdef to specify which files to include. I have not seen any way that I can specify defines to the
verible-verilog-syntax command. That is something like
verible-verilog-syntax --printtree --export_json --define USE_COVERAGE
top.sv
An workaround would be to create an tmp systemverilog file where I first have my `define lines and then put the content from
top.sv but that does not look to good.
I there an other better approach to get all the include files from an single
top.sv file? I only want the files list and nothing else.