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