6fd8c10e500b7e302b29a45639df456d8e49e0b3
[mes.git] / make / check-tinycc.make
1 ifeq ($(TEST),)
2 TEST:=$(TARGET)-check
3 $(TEST): EXT:=$(EXT)
4 $(TEST): EXPECT:=$(EXPECT)
5 $(TEST): $(OUT)/$(TARGET)
6 ifeq ($(EXPECT),)
7         $< - arg1 arg2 arg3 arg4 > $(<:.$(EXT)=.stdout)
8 else
9         $<; r=$$?; [ $$r = $(EXPECT) ]
10 endif
11         $(QUIETx)if diff -bu $(TINYCC_TEST2)/$(<F:.$(EXT)=.expect) $(<:.$(EXT)=.stdout); \
12         then rm -f $(<:.$(EXT)=.stdout); \
13         else exit 1; \
14         fi
15 endif
16 CHECK+=$(TEST)
17 $(TEST): TEST:=$(TEST)
18 $(DIR)-check: $(TEST)
19 include make/reset.make