mirror of
https://github.com/YosysHQ/sby.git
synced 2026-07-30 16:14:01 +00:00
tests: Add clean_rules target
Calling `make clean` can fail if a test folder has been collected but the source no longer exists. `make clean_rules` bypasses this by skipping the `include make/rules/collect.mk` in the same way as `make help`.
This commit is contained in:
parent
948a2caacb
commit
6a71a74ed8
1 changed files with 6 additions and 1 deletions
|
|
@ -47,7 +47,8 @@ make/rules/collect.mk: make/collect_tests.py
|
|||
make/rules/test/%.mk:
|
||||
python3 make/test_rules.py --rule $@ --source $<
|
||||
|
||||
ifneq (help,$(MAKECMDGOALS))
|
||||
NO_COLLECT_TARGS := help clean_rules
|
||||
ifneq ($(filter-out $(NO_COLLECT_TARGS),$(MAKECMDGOALS)),)
|
||||
|
||||
# This should run every time but only trigger anything depending on it whenever
|
||||
# the script overwrites make/rules/found_tools. This doesn't really match how
|
||||
|
|
@ -66,3 +67,7 @@ endif
|
|||
include make/rules/collect.mk
|
||||
|
||||
endif
|
||||
|
||||
.PHONY: clean_rules
|
||||
clean_rules:
|
||||
@rm -rf make/rules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue