Skip to content

Commit 7f55e4f

Browse files
committed
Prevent error on 'make clean'; prevent '#t' when using 'build-runtime.rkt'
1 parent d6fbb58 commit 7f55e4f

File tree

23 files changed

+52
-35
lines changed

23 files changed

+52
-35
lines changed

langs/abscond/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ runtime.o: $(objs)
3535
cat $< | racket -t compile-stdin.rkt -m > $@
3636

3737
clean:
38-
rm *.o *.s *.run
38+
@$(RM) *.o *.s *.run ||:
39+
@echo "$(shell basename $(shell pwd)): cleaned!"
3940

4041
%.test: %.run %.rkt
4142
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/blackmail/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ runtime.o: $(objs)
3535
cat $< | racket -t compile-stdin.rkt -m > $@
3636

3737
clean:
38-
rm *.o *.s *.run
38+
@$(RM) *.o *.s *.run ||:
39+
@echo "$(shell basename $(shell pwd)): cleaned!"
3940

4041
%.test: %.run %.rkt
4142
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/con/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ runtime.o: $(objs)
3535
cat $< | racket -t compile-stdin.rkt -m > $@
3636

3737
clean:
38-
rm *.o *.s *.run
38+
@$(RM) *.o *.s *.run ||:
39+
@echo "$(shell basename $(shell pwd)): cleaned!"
3940

4041
%.test: %.run %.rkt
4142
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/dodger/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ runtime.o: $(objs)
3636
cat $< | racket -t compile-stdin.rkt -m > $@
3737

3838
clean:
39-
rm *.o *.s *.run
39+
@$(RM) *.o *.s *.run ||:
40+
@echo "$(shell basename $(shell pwd)): cleaned!"
4041

4142
%.test: %.run %.rkt
4243
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/dupe/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ runtime.o: $(objs)
3636
cat $< | racket -t compile-stdin.rkt -m > $@
3737

3838
clean:
39-
rm *.o *.s *.run
39+
@$(RM) *.o *.s *.run ||:
40+
@echo "$(shell basename $(shell pwd)): cleaned!"
4041

4142
%.test: %.run %.rkt
4243
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/evildoer/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ runtime.o: $(objs)
3737
cat $< | racket -t compile-stdin.rkt -m > $@
3838

3939
clean:
40-
rm *.o *.s *.run
40+
@$(RM) *.o *.s *.run ||:
41+
@echo "$(shell basename $(shell pwd)): cleaned!"
4142

4243
%.test: %.run %.rkt
4344
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/extort/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ runtime.o: $(objs)
3737
cat $< | racket -t compile-stdin.rkt -m > $@
3838

3939
clean:
40-
rm *.o *.s *.run
40+
@$(RM) *.o *.s *.run ||:
41+
@echo "$(shell basename $(shell pwd)): cleaned!"
4142

4243
%.test: %.run %.rkt
4344
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/fraud/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ runtime.o: $(objs)
3737
cat $< | racket -t compile-stdin.rkt -m > $@
3838

3939
clean:
40-
rm *.o *.s *.run
40+
@$(RM) *.o *.s *.run ||:
41+
@echo "$(shell basename $(shell pwd)): cleaned!"
4142

4243
%.test: %.run %.rkt
4344
@test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))"

langs/fraud/build-runtime.rkt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
(require racket/runtime-path)
55
(define-runtime-path here ".")
66

7-
(system (string-append "make -C '"
8-
(path->string (normalize-path here))
9-
"' runtime.o"))
7+
(unless (system (string-append "make -C '"
8+
(path->string (normalize-path here))
9+
"' runtime.o"))
10+
(error 'build-runtime "could not build runtime"))
1011

1112
(define runtime-path
1213
(normalize-path (build-path here "runtime.o")))

langs/fraud/compile.rkt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353

5454
;; Op0 -> Asm
5555
(define (compile-prim0 p)
56-
(compile-op0 p))
57-
58-
;; Op1 Expr CEnv -> Asm
56+
(compile-op0 p));; Op1 Expr CEnv -> Asm
5957
(define (compile-prim1 p e c)
6058
(seq (compile-e e c)
6159
(compile-op1 p)))
@@ -65,9 +63,7 @@
6563
(seq (compile-e e1 c)
6664
(Push rax)
6765
(compile-e e2 (cons #f c))
68-
(compile-op2 p)))
69-
70-
;; Expr Expr Expr CEnv -> Asm
66+
(compile-op2 p)));; Expr Expr Expr CEnv -> Asm
7167
(define (compile-if e1 e2 e3 c)
7268
(let ((l1 (gensym 'if))
7369
(l2 (gensym 'if)))
@@ -78,9 +74,7 @@
7874
(Jmp l2)
7975
(Label l1)
8076
(compile-e e3 c)
81-
(Label l2))))
82-
83-
;; Expr Expr CEnv -> Asm
77+
(Label l2))));; Expr Expr CEnv -> Asm
8478
(define (compile-begin e1 e2 c)
8579
(seq (compile-e e1 c)
8680
(compile-e e2 c)))
@@ -100,3 +94,4 @@
10094
(match (eq? x y)
10195
[#t 0]
10296
[#f (+ 8 (lookup x rest))])]))
97+

0 commit comments

Comments
 (0)