2 # credits: 01..13.c from the pcc cpp-tests suite
6 TESTS
= $(patsubst %.c
,%.
test,$(wildcard *.c
))
12 @
$(TCC
) -E
-P
$< >$*.output
2>&1 ; \
13 diff
-Nu
-b
-B
-I
"^#" $(EXTRA_DIFF_OPTS
) $*.expect
$*.output \
16 # automatically generate .expect files with gcc:
18 gcc
-E
-P
$*.c
>$*.expect
2>&1
20 # tell make not to delete
26 # 02.test : EXTRA_DIFF_OPTS = -w
27 # 03.test : EXTRA_DIFF_OPTS = -w
28 # 04.test : EXTRA_DIFF_OPTS = -w
29 # 10.test : EXTRA_DIFF_OPTS = -w
32 # -b ighore space changes
33 # -w ighore all whitespace
34 # -B ignore blank lines
35 # -I <RE> ignore lines matching RE