Backup
This commit is contained in:
parent
d3bb6b4602
commit
b0184ac4f7
|
|
@ -41,3 +41,4 @@ README.html
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
foreign/c/primitives/chibi/foreign-c.c
|
foreign/c/primitives/chibi/foreign-c.c
|
||||||
*.pdf
|
*.pdf
|
||||||
|
.*
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,24 @@ ARG SCHEME=chibi
|
||||||
ARG IMAGE=chibi:head
|
ARG IMAGE=chibi:head
|
||||||
FROM schemers/${IMAGE}
|
FROM schemers/${IMAGE}
|
||||||
FROM debian:trixie AS build
|
FROM debian:trixie AS build
|
||||||
WORKDIR /debs
|
WORKDIR /cache/debs
|
||||||
RUN apt-get update && apt-get install \
|
RUN apt-get update && apt-get install \
|
||||||
-y \
|
-y \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
--no-install-suggests \
|
--no-install-suggests \
|
||||||
--download-only \
|
--download-only \
|
||||||
gcc libffi-dev libc-dev cmark make linux-libc-dev
|
gcc libffi-dev libc-dev make linux-libc-dev
|
||||||
|
RUN cp -r /var/cache/apt/archives/*.deb .
|
||||||
|
|
||||||
ARG SCHEME=chibi
|
ARG SCHEME=chibi
|
||||||
ARG IMAGE=chibi:head
|
ARG IMAGE=chibi:head
|
||||||
FROM schemers/${IMAGE}
|
FROM schemers/${IMAGE}
|
||||||
COPY --from=build /var/cache/apt/archives/*.deb /debs/
|
COPY --from=build /cache /cache
|
||||||
RUN dpkg -i /debs/*.deb
|
WORKDIR /cache/debs
|
||||||
|
RUN dpkg -i *.deb
|
||||||
COPY --from=retropikzel1/compile-r7rs /opt/compile-r7rs /opt/compile-r7rs
|
COPY --from=retropikzel1/compile-r7rs /opt/compile-r7rs /opt/compile-r7rs
|
||||||
ENV PATH=${PATH}:/opt/compile-r7rs/bin:/build/usr/bin
|
RUN /opt/compile-r7rs/bin/install-docker
|
||||||
|
WORKDIR /
|
||||||
ARG SCHEME=chibi
|
ARG SCHEME=chibi
|
||||||
ENV COMPILE_R7RS=${SCHEME}
|
ENV COMPILE_R7RS=${SCHEME}
|
||||||
ENV GUILE_AUTO_COMPILE=0
|
|
||||||
RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm
|
|
||||||
|
|
||||||
|
|
|
||||||
36
Makefile
36
Makefile
|
|
@ -1,16 +1,8 @@
|
||||||
.PHONY: libtest.o tests/libtest.so libtest.a documentation README.html foreign-c.pdf
|
.PHONY: libtest.o tests/libtest.so libtest.a documentation README.html
|
||||||
PDFENGINE=weasyprint
|
|
||||||
VERSION=0.10.6
|
|
||||||
TEST=primitives
|
|
||||||
SCHEME=chibi
|
SCHEME=chibi
|
||||||
TMPDIR=tmp/${SCHEME}
|
VERSION=0.10.6
|
||||||
SNOW_CHIBI_ARGS=""
|
|
||||||
DOCKERIMG=${SCHEME}:head
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
TMPDIR=.tmp/
|
||||||
ifeq "${SCHEME}" "chicken"
|
|
||||||
DOCKERIMG="chicken:5"
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: package
|
all: package
|
||||||
|
|
||||||
|
|
@ -23,6 +15,11 @@ package: README.html
|
||||||
--description="Portable foreign function interface for R7RS Schemes" \
|
--description="Portable foreign function interface for R7RS Schemes" \
|
||||||
foreign/c.sld
|
foreign/c.sld
|
||||||
|
|
||||||
|
README.html: README.md
|
||||||
|
echo "<pre>" > README.html
|
||||||
|
cat README.md >> README.html
|
||||||
|
echo "</pre>" >> README.html
|
||||||
|
|
||||||
install: package
|
install: package
|
||||||
snow-chibi --impls=${SCHEME} ${SNOW_CHIBI_ARGS} install foreign-c-${VERSION}.tgz; \
|
snow-chibi --impls=${SCHEME} ${SNOW_CHIBI_ARGS} install foreign-c-${VERSION}.tgz; \
|
||||||
if [ "${SCHEME}" = "gauche" ]; then \
|
if [ "${SCHEME}" = "gauche" ]; then \
|
||||||
|
|
@ -35,15 +32,21 @@ install: package
|
||||||
uninstall:
|
uninstall:
|
||||||
snow-chibi --impls=${SCHEME} remove "(foreign c)"
|
snow-chibi --impls=${SCHEME} remove "(foreign c)"
|
||||||
|
|
||||||
test: ${TMPDIR}/test/libtest.o ${TMPDIR}/test/libtest.so ${TMPDIR}/test/libtest.a
|
test-old: ${TMPDIR}/test/libtest.o ${TMPDIR}/test/libtest.so ${TMPDIR}/test/libtest.a
|
||||||
cp -r foreign ${TMPDIR}/test/
|
cp -r foreign ${TMPDIR}/test/
|
||||||
cp tests/*.scm ${TMPDIR}/test/
|
cp tests/*.scm ${TMPDIR}/test/
|
||||||
cp tests/c-include/libtest.h ${TMPDIR}/test/
|
cp tests/c-include/libtest.h ${TMPDIR}/test/
|
||||||
cd ${TMPDIR}/test && \
|
cd ${TMPDIR}/test && \
|
||||||
COMPILE_R7RS_CHICKEN="-L -ltest -I. -L." \
|
COMPILE_R7RS_CHICKEN="-L -ltest -I. -L." \
|
||||||
COMPILE_R7RS=${SCHEME} \
|
COMPILE_R7RS=${SCHEME} timeout 600 compile-r7rs -o ${TEST} ${TEST}.scm
|
||||||
compile-r7rs -o ${TEST} ${TEST}.scm
|
cd ${TMPDIR}/test && printf "\n" | LD_LIBRARY_PATH=. timeout 600 ./${TEST}
|
||||||
cd ${TMPDIR}/test \ && printf "\n" | LD_LIBRARY_PATH=. ./${TEST}
|
|
||||||
|
test:
|
||||||
|
rm -rf ${TMPDIR}
|
||||||
|
mkdir -p ${TMPDIR}
|
||||||
|
cp test.scm ${TMPDIR}/
|
||||||
|
cp -r foreign ${TMPDIR}/
|
||||||
|
cd ${TMPDIR} && COMPILE_R7RS="${SCHEME}" test-r7rs -I . -o test test.scm
|
||||||
|
|
||||||
test-docker:
|
test-docker:
|
||||||
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=foreign-c-test-${SCHEME} -f Dockerfile.test .
|
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=foreign-c-test-${SCHEME} -f Dockerfile.test .
|
||||||
|
|
@ -64,9 +67,6 @@ ${TMPDIR}/test/libtest.a: ${TMPDIR}/test/libtest.o tests/c-src/libtest.c
|
||||||
${TMPDIR}:
|
${TMPDIR}:
|
||||||
mkdir -p ${TMPDIR}
|
mkdir -p ${TMPDIR}
|
||||||
|
|
||||||
README.html: README.md
|
|
||||||
cmark README.md > README.html
|
|
||||||
|
|
||||||
chibi: foreign/c/primitives/chibi/foreign-c.stub
|
chibi: foreign/c/primitives/chibi/foreign-c.stub
|
||||||
chibi-ffi foreign/c/primitives/chibi/foreign-c.stub
|
chibi-ffi foreign/c/primitives/chibi/foreign-c.stub
|
||||||
${CC} \
|
${CC} \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
ypsilon --r7rs --mute --quiet --sitelib=. --top-level-program primitives.scm "$@"
|
||||||
Loading…
Reference in New Issue