historical/m0-applesillicon.git/xnu-qemu-arm64-5.1.0/roms/skiboot/external/Makefile.check
2024-01-16 11:20:27 -06:00

31 lines
853 B
Makefile

# -*-Makefile-*-
TOOL=gard ffspart pflash
CHECK_TOOL=$(patsubst %,check-%,$(TOOL))
TOOL_COVERAGE=$(patsubst %,%-coverage,$(TOOL))
TOOL_TEST_CLEAN=$(patsubst %,%-test-clean,$(TOOL))
.PHONY: check
check: $(CHECK_TOOL)
#Makefile knows to build and clean it before checking, should also
#make clean before checking. If not, .o files for different
#architectures might be lying around and clean once done to avoid the
#opposite
.PHONY: $(CHECK_TOOL)
$(CHECK_TOOL):
$(call QTEST, RUN-TEST , make CC=$(HOSTCC) CROSS='' CROSS_COMPILE='' \
-C external/$(patsubst check-%,%,$@) check, $@)
clean: $(TOOL_TEST_CLEAN)
.PHONY: $(TOOL_COVERAGE)
coverage: $(TOOL_COVERAGE)
$(TOOL_COVERAGE): $(patsubst %-coverage, check-%, $@)
.PHONY: $(TOOL_TEST_CLEAN)
$(TOOL_TEST_CLEAN):
$(call QTEST, CLEANUP , make -C external/$(patsubst %-test-clean,%,$@) clean, $@)