a4a323c2bb
* make/check-tinycc.make: New file. * tinycc/tinycc.make: New file. * GNUmakefile (SUBDIRS): Add tinycc.
20 lines
452 B
Makefile
20 lines
452 B
Makefile
ifeq ($(TEST),)
|
|
TEST:=$(TARGET)-check
|
|
$(TEST): EXT:=$(EXT)
|
|
$(TEST): EXPECT:=$(EXPECT)
|
|
$(TEST): $(OUT)/$(TARGET)
|
|
ifeq ($(EXPECT),)
|
|
$< - arg1 arg2 arg3 arg4 > $(<:.$(EXT)=.stdout)
|
|
else
|
|
$<; r=$$?; [ $$r = $(EXPECT) ]
|
|
endif
|
|
$(QUIETx)if diff -bu $(TINYCC_TEST2)/$(<F:.$(EXT)=.expect) $(<:.$(EXT)=.stdout); \
|
|
then rm -f $(<:.$(EXT)=.stdout); \
|
|
else exit 1; \
|
|
fi
|
|
endif
|
|
CHECK+=$(TEST)
|
|
$(TEST): TEST:=$(TEST)
|
|
$(DIR)-check: $(TEST)
|
|
include make/reset.make
|