forked from cmsc430/fp-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 901 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
progs := $(wildcard progs/*.rkt)
execs := $(patsubst %.rkt,%.run,$(wildcard progs/*.rkt))
progs-io := $(wildcard progs-io/*.rkt)
execs-io := $(patsubst %.rkt,%.run,$(wildcard progs-io/*.rkt))
dir-io := $(wildcard input/*)
%.run: %.rkt
make -C .. fp-test/$@
compile: $(execs)
compile-io: $(execs-io)
run-io: $(execs-io)
@for d in `ls input`; do for f in input/$$d/*txt; do cat $$f | progs-io/$$d.run; done; done > run-io
racket-io: $(execs-io)
@for d in `ls input`; do for f in input/$$d/*txt; do cat $$f | racket progs-io/$$d.rkt; done; done > racket-io
test: compile-io
for d in `ls input`; do for f in input/$$d/*txt; do echo $$f progs-io/$$d.run; cat $$f | progs-io/$$d.run > /dev/null; done; done
testall:
@make run-io > compiled-out.txt
@make racket-io > racket-out.txt
diff compiled-out.txt racket-out.txt
clean:
-rm run-io
-rm racket-io
-rm progs/*run
-rm progs-io/*run