mes/make/check.make
Jan Nieuwenhuizen d148f78a5c test: Support for non-Guix[SD]: cater for missing CC/CC32 compilers.
* 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.
2017-06-20 19:47:15 +02:00

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