2 # credits: 01..13.c from the pcc cpp-tests suite
6 include $(TOP
)/config.mak
7 SRC
= $(TOPSRC
)/tests
/pp
11 files
= $(patsubst %.
$1,%.
test,$(notdir $(wildcard $(SRC
)/*.
$1)))
12 TESTS
= $(call files
,c
) $(call files
,S
)
14 all test : $(sort $(TESTS
))
16 DIFF_OPTS
= -Nu
-b
-B
-I
"^\#"
20 -@
$(TCC
) -E
-P
$< >$*.output
2>&1 ; \
21 diff
$(DIFF_OPTS
) $(SRC
)/$*.expect
$*.output \
26 -@
$(TCC
) -E
-P
$< >$*.output
2>&1 ; \
27 diff
$(DIFF_OPTS
) $(SRC
)/$*.expect
$*.output \
30 # automatically generate .expect files with gcc:
32 gcc
-E
-P
$< >$*.expect
2>&1
35 gcc
-E
-P
$< >$*.expect
2>&1
37 # tell make not to delete
43 02.
test : DIFF_OPTS
+= -w
44 15.
test : DIFF_OPTS
+= -I
"^XXX:"
47 # -b ighore space changes
48 # -w ighore all whitespace
49 # -B ignore blank lines
50 # -I <RE> ignore lines matching RE