annotate tests/Makefile @ 47:2e25e55dba6b

Fix inline usage as per the version in dholland-make2.
author David A. Holland
date Sat, 30 Mar 2013 23:05:59 -0400
parents eaa154ded584
children 0af03c5571e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
1 TRADCPP=../obj/tradcpp # XXX
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
2
46
eaa154ded584 Test recursive macros.
David A. Holland
parents: 35
diff changeset
3 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
4
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
5 all: run-tests .WAIT show-diffs
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
6
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
7 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
8 run-tests: $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
9
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
10 $(T).diff: $(T).run $(T).good $(TRADCPP)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
11 -diff $(T).good $(T).run > $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
12
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
13 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
14 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
15 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
16
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
17 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
18 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
20 @cat $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
21 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
23 clean:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
24 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
25 rm -f $(T).run $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
26 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
27
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
28 good:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
29 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
30 cp $(T).run $(T).good
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
31 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
32
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
33 .PHONY: all run-tests show-diffs clean good