Handle no -o
This commit is contained in:
parent
518cc1e0da
commit
097b981d58
5
Makefile
5
Makefile
|
|
@ -19,9 +19,14 @@ test:
|
||||||
@echo "(display \"Hello\") (newline)" >> .tmp/main.sps
|
@echo "(display \"Hello\") (newline)" >> .tmp/main.sps
|
||||||
@echo "(import (scheme base) (scheme write))" > .tmp/main.scm
|
@echo "(import (scheme base) (scheme write))" > .tmp/main.scm
|
||||||
@echo "(display \"Hello\") (newline)" >> .tmp/main.scm
|
@echo "(display \"Hello\") (newline)" >> .tmp/main.scm
|
||||||
|
@rm -rf .tmp/main
|
||||||
@if [ "${RNRS}" = "r6rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main -I libs -A other_libs main.sps; fi
|
@if [ "${RNRS}" = "r6rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main -I libs -A other_libs main.sps; fi
|
||||||
@if [ "${RNRS}" = "r7rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main -I libs -A other_libs main.scm; fi
|
@if [ "${RNRS}" = "r7rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main -I libs -A other_libs main.scm; fi
|
||||||
@cd .tmp && ./main
|
@cd .tmp && ./main
|
||||||
|
@rm -rf .tmp/main
|
||||||
|
@if [ "${RNRS}" = "r6rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -I libs -A other_libs main.sps; fi
|
||||||
|
@if [ "${RNRS}" = "r7rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -I libs -A other_libs main.scm; fi
|
||||||
|
@cd .tmp && ./main
|
||||||
|
|
||||||
test-docker:
|
test-docker:
|
||||||
docker build --build-arg SCHEME=${SCHEME} -f Dockerfile.test --tag=${SCHEME}-testing .
|
docker build --build-arg SCHEME=${SCHEME} -f Dockerfile.test --tag=${SCHEME}-testing .
|
||||||
|
|
|
||||||
10
compile-r7rs
10
compile-r7rs
|
|
@ -43,8 +43,16 @@ prepend_dirs="${prepend_dirs#:}"
|
||||||
append_dirs="${append_dirs#:}"
|
append_dirs="${append_dirs#:}"
|
||||||
prepend_dirs="${prepend_dirs#,}"
|
prepend_dirs="${prepend_dirs#,}"
|
||||||
append_dirs="${append_dirs#,}"
|
append_dirs="${append_dirs#,}"
|
||||||
prefix="#!/usr/bin/env -S"
|
|
||||||
|
|
||||||
|
if [ "${input_file:-}" = "" ]; then echo "Error, no input file"; exit 1; fi
|
||||||
|
|
||||||
|
case ${input_file:-} in
|
||||||
|
*.sps) output_file="${input_file%.sps}";;
|
||||||
|
*.scm) output_file="${input_file%.scm}";;
|
||||||
|
*) echo "Error, invalid input file";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
prefix="#!/usr/bin/env -S"
|
||||||
case $rnrs in
|
case $rnrs in
|
||||||
r6rs)
|
r6rs)
|
||||||
case $COMPILE_R7RS in
|
case $COMPILE_R7RS in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue