Compare commits
3 Commits
8dc61b067b
...
a7e50b7007
| Author | SHA1 | Date |
|---|---|---|
|
|
a7e50b7007 | |
|
|
5fa00c1413 | |
|
|
3d04909627 |
|
|
@ -1,5 +1,6 @@
|
|||
ARG SCHEME=chibi
|
||||
FROM docker.io/schemers/${SCHEME}
|
||||
ARG IMAGE=chibi:latest
|
||||
FROM docker.io/schemers/${IMAGE}
|
||||
ARG SCHEME=chibi
|
||||
ENV COMPILE_R7RS=${SCHEME}
|
||||
RUN apt-get update && apt-get install -y make
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ pipeline {
|
|||
filename 'Dockerfile.jenkins'
|
||||
label 'docker-x86_64'
|
||||
args '--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
11
Makefile
11
Makefile
|
|
@ -1,5 +1,6 @@
|
|||
PREFIX=/usr/local
|
||||
SCHEME=chibi
|
||||
IMAGE=${SCHEME}:latest
|
||||
RNRS=r7rs
|
||||
|
||||
all: build
|
||||
|
|
@ -20,16 +21,12 @@ test:
|
|||
@echo "(import (scheme base) (scheme write))" > .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}" = "r7rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main -I libs -A other_libs main.scm; fi
|
||||
@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
|
||||
@if [ "${RNRS}" = "r6rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main main.sps; fi
|
||||
@if [ "${RNRS}" = "r7rs" ]; then cd .tmp && COMPILE_R7RS=${SCHEME} sh ../compile-r7rs -o main main.scm; fi
|
||||
@cd .tmp && ./main
|
||||
|
||||
test-docker:
|
||||
docker build --build-arg SCHEME=${SCHEME} -f Dockerfile.test --tag=${SCHEME}-testing .
|
||||
docker build --build-arg IMAGE=${IMAGE} --build-arg SCHEME=${SCHEME} -f Dockerfile.test --tag=${SCHEME}-testing .
|
||||
docker run ${SCHEME}-testing sh -c "make SCHEME=${SCHEME} RNRS=${RNRS} test"
|
||||
|
||||
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -3,10 +3,13 @@ Implementation of
|
|||
made with POSIX Shell.
|
||||
|
||||
|
||||
No support for -D yet.
|
||||
## Usage
|
||||
|
||||
COMPILE_R7RS=${SCHEME} compile-r7rs -o main -I libs -A other_libs main.scm
|
||||
./main
|
||||
|
||||
|
||||
Supported implementations:
|
||||
## Implementations
|
||||
- capyscheme
|
||||
- chezscheme
|
||||
- chibi
|
||||
|
|
@ -29,3 +32,6 @@ Supported implementations:
|
|||
- stklos
|
||||
- tr7
|
||||
- ypsilon
|
||||
|
||||
## Misc
|
||||
- No support for -D yet.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ prefix="#!/usr/bin/env -S"
|
|||
case $rnrs in
|
||||
R6RS)
|
||||
case $COMPILE_R7RS in
|
||||
capyscheme) printf "\n#|\nexec capy --r6rs $prepend_dirs $append_dirs --script \$0\n|#\n" >> "$output_file";;
|
||||
chezscheme) echo "$prefix scheme --libdirs $prepend_dirs:$append_dirs --program" >> "$output_file";;
|
||||
guile) printf "$prefix guile --r6rs $prepend_dirs $append_dirs\n!#\n" >> "$output_file";;
|
||||
ikarus) echo "$prefix IKARUS_LIBRARY_PATH=$prepend_dirs:$append_dirs ikarus --r6rs-script" >> "$output_file";;
|
||||
|
|
@ -71,6 +72,7 @@ case $rnrs in
|
|||
esac;;
|
||||
R7RS)
|
||||
case $COMPILE_R7RS in
|
||||
capyscheme) printf "\n#|\nexec capy --r7rs $prepend_dirs $append_dirs --script \$0\n|#\n" >> "$output_file";;
|
||||
chicken) csc -o "$output_file" "$input_file";;
|
||||
chibi) echo "$prefix chibi-scheme $prepend_dirs $append_dirs" >> "$output_file";;
|
||||
cyclone) cyclone -o "$output_file" $prepend_dirs $append_dirs "$input_file";;
|
||||
|
|
|
|||
Loading…
Reference in New Issue