diff --git a/langs/abscond/Makefile b/langs/abscond/Makefile index 8084e303..3200bc6d 100644 --- a/langs/abscond/Makefile +++ b/langs/abscond/Makefile @@ -35,7 +35,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/blackmail/Makefile b/langs/blackmail/Makefile index 8084e303..3200bc6d 100644 --- a/langs/blackmail/Makefile +++ b/langs/blackmail/Makefile @@ -35,7 +35,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/con/Makefile b/langs/con/Makefile index 8084e303..3200bc6d 100644 --- a/langs/con/Makefile +++ b/langs/con/Makefile @@ -35,7 +35,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/dodger/Makefile b/langs/dodger/Makefile index 17e67120..4555cee7 100644 --- a/langs/dodger/Makefile +++ b/langs/dodger/Makefile @@ -36,7 +36,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/dupe/Makefile b/langs/dupe/Makefile index 17e67120..4555cee7 100644 --- a/langs/dupe/Makefile +++ b/langs/dupe/Makefile @@ -36,7 +36,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/evildoer/Makefile b/langs/evildoer/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/evildoer/Makefile +++ b/langs/evildoer/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/extort/Makefile b/langs/extort/Makefile index 05d677a9..4c6bde9a 100644 --- a/langs/extort/Makefile +++ b/langs/extort/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/fraud/Makefile b/langs/fraud/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/fraud/Makefile +++ b/langs/fraud/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/fraud/build-runtime.rkt b/langs/fraud/build-runtime.rkt index 2302edf5..18431504 100644 --- a/langs/fraud/build-runtime.rkt +++ b/langs/fraud/build-runtime.rkt @@ -4,9 +4,10 @@ (require racket/runtime-path) (define-runtime-path here ".") -(system (string-append "make -C '" - (path->string (normalize-path here)) - "' runtime.o")) +(unless (system (string-append "make -C '" + (path->string (normalize-path here)) + "' runtime.o")) + (error 'build-runtime "could not build runtime")) (define runtime-path (normalize-path (build-path here "runtime.o"))) diff --git a/langs/fraud/compile.rkt b/langs/fraud/compile.rkt index edfa7aec..bb9cee39 100644 --- a/langs/fraud/compile.rkt +++ b/langs/fraud/compile.rkt @@ -53,9 +53,7 @@ ;; Op0 -> Asm (define (compile-prim0 p) - (compile-op0 p)) - -;; Op1 Expr CEnv -> Asm + (compile-op0 p));; Op1 Expr CEnv -> Asm (define (compile-prim1 p e c) (seq (compile-e e c) (compile-op1 p))) @@ -65,9 +63,7 @@ (seq (compile-e e1 c) (Push rax) (compile-e e2 (cons #f c)) - (compile-op2 p))) - -;; Expr Expr Expr CEnv -> Asm + (compile-op2 p)));; Expr Expr Expr CEnv -> Asm (define (compile-if e1 e2 e3 c) (let ((l1 (gensym 'if)) (l2 (gensym 'if))) @@ -78,9 +74,7 @@ (Jmp l2) (Label l1) (compile-e e3 c) - (Label l2)))) - -;; Expr Expr CEnv -> Asm + (Label l2))));; Expr Expr CEnv -> Asm (define (compile-begin e1 e2 c) (seq (compile-e e1 c) (compile-e e2 c))) @@ -100,3 +94,4 @@ (match (eq? x y) [#t 0] [#f (+ 8 (lookup x rest))])])) + diff --git a/langs/hoax/Makefile b/langs/hoax/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/hoax/Makefile +++ b/langs/hoax/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/hustle/Makefile b/langs/hustle/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/hustle/Makefile +++ b/langs/hustle/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/iniquity-gc/Makefile b/langs/iniquity-gc/Makefile index 19272d02..47b2b108 100644 --- a/langs/iniquity-gc/Makefile +++ b/langs/iniquity-gc/Makefile @@ -33,7 +33,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/iniquity/Makefile b/langs/iniquity/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/iniquity/Makefile +++ b/langs/iniquity/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/jig/Makefile b/langs/jig/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/jig/Makefile +++ b/langs/jig/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/knock/Makefile b/langs/knock/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/knock/Makefile +++ b/langs/knock/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/loot/Makefile b/langs/loot/Makefile index 9055c88f..db6ac44a 100644 --- a/langs/loot/Makefile +++ b/langs/loot/Makefile @@ -37,7 +37,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/modules-in-progress/Makefile b/langs/modules-in-progress/Makefile index 1bba6a32..bd832496 100644 --- a/langs/modules-in-progress/Makefile +++ b/langs/modules-in-progress/Makefile @@ -40,6 +40,7 @@ runtime.o: $(objs) make $@ clean: - -rm *.o *.s *.run $(BUILD_DIR)/*.make + @$(RM) *.o *.s *.run $(BUILD_DIR)/*.make ||: + @echo "$(shell basename $(shell pwd)): cleaned!" -include $(wildcard $(BUILD_DIR)/*.make) diff --git a/langs/mountebank/Makefile b/langs/mountebank/Makefile index 7fb41f2a..ed8a85f4 100644 --- a/langs/mountebank/Makefile +++ b/langs/mountebank/Makefile @@ -38,7 +38,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/mug/Makefile b/langs/mug/Makefile index 7fb41f2a..ed8a85f4 100644 --- a/langs/mug/Makefile +++ b/langs/mug/Makefile @@ -38,7 +38,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/neerdowell/Makefile b/langs/neerdowell/Makefile index 7fb41f2a..ed8a85f4 100644 --- a/langs/neerdowell/Makefile +++ b/langs/neerdowell/Makefile @@ -38,7 +38,8 @@ runtime.o: $(objs) cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run + @$(RM) *.o *.s *.run ||: + @echo "$(shell basename $(shell pwd)): cleaned!" %.test: %.run %.rkt @test "$(shell ./$(<))" = "$(shell racket $(word 2,$^))" diff --git a/langs/outlaw/Makefile b/langs/outlaw/Makefile index 48c629c0..26a65a57 100644 --- a/langs/outlaw/Makefile +++ b/langs/outlaw/Makefile @@ -78,7 +78,8 @@ stdlib.s: stdlib.rkt cat $< | racket -t compile-stdin.rkt -m > $@ clean: - rm *.o *.s *.run outlaw.rkt + @$(RM) *.o *.s *.run outlaw.rkt ||: + @echo "$(shell basename $(shell pwd)): cleaned!" outlaw2.s: outlaw.rkt outlaw.run cat outlaw.rkt | ./outlaw.run > outlaw2.s diff --git a/ziggy/src/build-runtime.rkt b/ziggy/src/build-runtime.rkt index 8b9b5368..33284803 100644 --- a/ziggy/src/build-runtime.rkt +++ b/ziggy/src/build-runtime.rkt @@ -5,9 +5,10 @@ (require racket/runtime-path) (define-runtime-path here ".") -(system (string-append "make -C '" - (path->string (normalize-path here)) - "' runtime.o")) +(unless (system (string-append "make -C '" + (path->string (normalize-path here)) + "' runtime.o")) + (error 'build-runtime "could not build runtime")) (define runtime-path (normalize-path (build-path here "runtime.o")))