d148f78a5c
* make/check.make: Skip if CC is not set. * make/check-mlibc.make: New file. * scaffold/scaffold.make: Use it for mlibc targets. * tinycc/tinycc.make: Skip mlibc targets if CC32 not set.
20 lines
317 B
Makefile
20 lines
317 B
Makefile
ifneq ($(CC),)
|
|
ifeq ($(TEST),)
|
|
TEST:=$(TARGET)-check
|
|
$(TEST): EXPECT:=$(EXPECT)
|
|
$(TEST): SHELL:=$(SHELL)
|
|
$(TEST): $(OUT)/$(TARGET)
|
|
@export SHELL=$(SHELL)
|
|
ifeq ($(EXPECT),)
|
|
$<
|
|
else
|
|
$<; r=$$?; [ $$r = $(EXPECT) ]
|
|
endif
|
|
endif
|
|
CHECK+=$(TEST)
|
|
$(TEST): TEST:=$(TEST)
|
|
$(DIR)-check: $(TEST)
|
|
endif
|
|
include make/reset.make
|
|
|