Added concept of examples into Makefile

This commit is contained in:
2025-12-13 19:43:36 +02:00
parent fae5fff6f1
commit 7e4e447c73
6 changed files with 221 additions and 170 deletions
+6
View File
@@ -2,6 +2,8 @@
.PHONY: test-r6rs test-r7rs
SCHEME=chibi
LIBRARY=system
EXAMPLE=editor
EXAMPLE_FILE=retropikzel/${LIBRARY}/examples/${EXAMPLE}.scm
AUTHOR=Retropikzel
LIBRARY_FILE=retropikzel/${LIBRARY}.sld
@@ -40,6 +42,10 @@ test-r7rs-docker:
docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=foreign-c-library-test-${SCHEME} --quiet .
docker run -t foreign-c-library-test-${SCHEME} sh -c "make SCHEME=${SCHEME} LIBRARY=${LIBRARY} SNOW_CHIBI_ARGS=--always-yes build install test-r7rs"
example-r7rs: ${EXAMPLE_FILE}
COMPILE_R7RS=${SCHEME} compile-scheme -I . -o example ${EXAMPLE_FILE}
./example
test-r6rs:
echo "(import (rnrs) (foreign c) (retropikzel ${LIBRARY}) (srfi :64))" > test-r6rs.sps
cat retropikzel/${LIBRARY}/test.scm >> test-r6rs.sps