mescc: Refactor mlibc compilation.
[mes.git] / make / check.make
1 ifeq ($(TEST),)
2 TEST:=$(TARGET)-check
3 $(TEST): EXPECT:=$(EXPECT)
4 $(TEST): SHELL:=$(SHELL)
5 $(TEST): $(OUT)/$(TARGET)
6         @export SHELL=$(SHELL)
7 ifeq ($(EXPECT),)
8         $<
9 else
10         $<; r=$$?; [ $$r = $(EXPECT) ]
11 endif
12 endif
13 CHECK+=$(TEST)
14 $(TEST): TEST:=$(TEST)
15 $(DIR)-check: $(TEST)
16 include make/reset.make