| SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) |
| |
| # Developer options for quicker runs |
| # Run algorithm, but only a small number of iterations |
| QUICK=N |
| # Skip metadata steps like tile and part generation |
| # Ex: FUZZONLY=N: 30 min, FUZZONLY=Y: 6 min |
| FUZZONLY=N |
| # 074 fuzzer isn't changed often and is slow |
| # Allow building without it |
| BITONLY=N |
| |
| all: |
| clean: clean_fuzzers clean_logs clean_locks |
| |
| clean_locks: |
| rm -rf /tmp/segbits_*.db.lock |
| |
| |
| define fuzzer |
| |
| # $(1) - Fuzzer name/directory |
| # $(2) - Space seperated list of dependencies for the fuzzer. |
| |
| # Make the all target depend on the run.ok file for the fuzzer. |
| all: $(1)/run.ok |
| |
| # Make the clean target run `make clean` in the fuzzer's directory. |
| clean_fuzzers:: |
| $$(MAKE) -C $(1) clean |
| |
| clean_logs:: |
| rm -rf $(1)/logs |
| |
| # Describe how to create the fuzzer's run.ok file. |
| # This command must start with a + to tell make to pass the jobserver |
| # parameters downwards. |
| ifeq ($(VERBOSE),Y) |
| |
| # When verbose we just call make directory |
| $(1)/run.ok: $(addsuffix /run.ok,$(2)) |
| $$(MAKE) -C $(1) run |
| |
| else |
| |
| # When not verbose, we use the run_fuzzer wrapper which will save the results |
| # to log files. |
| $(1)/run.ok: $(addsuffix /run.ok,$(2)) |
| +@$(SELF_DIR)/run_fuzzer.py $(1) |
| |
| endif |
| |
| endef |
| |
| $(eval $(call fuzzer,000-init-db,)) |
| |
| ifneq ($(FUZZONLY),Y) |
| $(eval $(call fuzzer,001-part-yaml,000-init-db)) |
| $(eval $(call fuzzer,002-tilegrid,001-part-yaml)) |
| else |
| all:: 002-tilegrid/run.ok |
| touch 002-tilegrid/run.ok |
| endif |
| |
| # part_only runs the fuzzers required for supporting additional parts. |
| # Note: In theory this includes 002-tilegrid, but there isn't support for |
| # multiple tilegrid's per family at this time. |
| part_only: |
| +$(MAKE) -C 001-part-yaml run |
| |
| .PHONY: all clean clean_fuzzers clean_logs quick part_only |