Revert all of my changes to directories & codingstyle.
[tinycc.git] / tests / pp / Makefile
blobc656f9a8e13a5c3d1427bd7acd15eb40c2c8907d
2 # credits: 01..13.c from the pcc cpp-tests suite
5 TCC = ../../tcc
6 TESTS = $(patsubst %.c,%.test,$(wildcard *.c))
8 all test : $(TESTS)
10 %.test: %.c %.expect
11 @echo PPTest $* ...
12 @$(TCC) -E -P $< >$*.output 2>&1 ; \
13 diff -Nu -b -B -I "^#" $(EXTRA_DIFF_OPTS) $*.expect $*.output \
14 && rm -f $*.output
16 # automatically generate .expect files with gcc:
17 %.expect :
18 gcc -E -P $*.c >$*.expect 2>&1
20 # tell make not to delete
21 .PRECIOUS: %.expect
23 clean:
24 rm -vf *.output
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
31 # diff options:
32 # -b ighore space changes
33 # -w ighore all whitespace
34 # -B ignore blank lines
35 # -I <RE> ignore lines matching RE