Skip to content

Commit

Permalink
Merge pull request #342 from zapta/develop
Browse files Browse the repository at this point in the history
Extended the apio clean command to delete all the .out and .vcd files.
  • Loading branch information
Obijuan authored Feb 20, 2024
2 parents f60ec5c + 128aa37 commit ac27cf3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion apio/resources/ice40/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ AlwaysBuild(lint)

Default(bitstream)

# -- These is for cleaning the files generated using the alias targets
# -- These is for cleaning the artifact files.
if GetOption('clean'):
# Create a list of additional files that we want to clean up, regardless
# of the current dependencies. For example, artifacts of testbench
# simulations.
cleanup_nodes = []
for glob_pattern in ['*.out', '*.vcd']:
cleanup_nodes.extend(Glob(glob_pattern))
cleanup_files = [str(f) for f in cleanup_nodes]
cleanup_files.sort() # User report looks nicer with sorting (?)

env.Clean(t, cleanup_files)
env.Default([t, vout, sout, vcd_file])

0 comments on commit ac27cf3

Please sign in to comment.