Skip to content

Commit 9686dc3

Browse files
author
Joshua Goller
committed
fixes chapter 4 makefile
1 parent 2d5b9ea commit 9686dc3

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

ch-4/Makefile

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
# "build" is in the top-level makefile
2-
4.1 4.12-13 4.14: clean
3-
make EX=$@ CH=ch-4 build
4-
ifdef RUN_TESTS
5-
$(VALGRIND) ./bin/$@
6-
endif
1+
4.1: 4.1-build 4.1-basic-test
72

8-
4.2:
9-
make EX=$@ CH=ch-4 build
3+
4.2: 4.2-build
104
ifdef RUN_TESTS
115
printf "10.0e4" | $(VALGRIND) ./bin/$@
126
printf "10.0e-4" | $(VALGRIND) ./bin/$@
@@ -15,21 +9,23 @@ ifdef RUN_TESTS
159
printf "" | $(VALGRIND) ./bin/$@
1610
endif
1711

18-
4.11:
19-
make EX=$@ CH=ch-4 build
20-
ifdef RUN_TESTS
21-
printf "20 5 +\n" | $(VALGRIND) ./bin/$@
22-
printf "20 5 5 + +\n" | $(VALGRIND) ./bin/$@
23-
printf "" | $(VALGRIND) ./bin/$@
24-
endif
25-
2612
# the reverse polish calc is exercises 4.3 through 4.10.
2713
rpc: clean
2814
$(COMPILE) -I ch-4/rpc/include/ ch-4/rpc/src/*.c -o bin/$@
2915
ifdef RUN_TESTS
30-
#printf "4 5 +\n" | $(VALGRIND) ./bin/$@
31-
#printf "4 5 + 5 6 + -\n" | $(VALGRIND) ./bin/$@
32-
#printf "a 5 =" | $(VALGRIND) ./bin/$@
16+
printf "4 5 +\n" | $(VALGRIND) ./bin/$@
17+
printf "4 5 + 5 6 + -\n" | $(VALGRIND) ./bin/$@
18+
printf "a 5 =" | $(VALGRIND) ./bin/$@
3319
printf "b 6 = \n b 10 * SIN\n" | $(VALGRIND) ./bin/$@
34-
#printf "" | $(VALGRIND) ./bin/$@
20+
printf "" | $(VALGRIND) ./bin/$@
21+
endif
22+
23+
4.11: 4.11-build
24+
ifdef RUN_TESTS
25+
printf "20 5 +\n" | $(VALGRIND) ./bin/$@
26+
printf "20 5 5 + +\n" | $(VALGRIND) ./bin/$@
27+
printf "" | $(VALGRIND) ./bin/$@
3528
endif
29+
30+
4.12-13: 4.12-13-build 4.12-13-basic-test
31+
4.14: 4.14-build 4.14-basic-test

0 commit comments

Comments
 (0)