forked from open-power/skiboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.check
34 lines (25 loc) · 965 Bytes
/
Makefile.check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
# -*-Makefile-*-
TOOL=gard ffspart pflash
CHECK_TOOL=$(patsubst %,check-%,$(TOOL))
TOOL_COVERAGE=$(patsubst %,%-coverage,$(TOOL))
TOOL_TEST_CLEAN=$(patsubst %,%-test-clean,$(TOOL))
.PHONY: external-check
external-check: $(CHECK_TOOL)
.PHONY: check
check: external-check
#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, $@)