scheme-libraries/Makefile

61 lines
1.6 KiB
Makefile

.POSIX:
SCHEME=chibi
LIBRARY=tap
DOCKER_TAG=latest
library_file=retropikzel/${LIBRARY}.sld
testfile=retropikzel/${LIBRARY}/test.scm
splitclean=awk -F ':' '{print($$2)}' | tr -d ' '
version=$$(grep "Version:" ${library_file} | ${splitclean})
license=$$(grep "SPDX-License-Identifier:" ${library_file} | awk -F ":" "{print(\$$2)}" | tr -d ' ')
description=$$(grep "Description:" ${library_file} | awk -F ':' '{print($$2)}' | tr -d ' ')
additional_libraries=$$(grep "Additional Libraries:" ${library_file} | awk -F ':' '{print($$2)}' || echo "")
pkg=retropikzel-${LIBRARY}-${version}.tgz
debug:
echo "${license}"
all: package
package:
snow-chibi package \
--always-yes \
--version="${version}" \
--authors=Retropikzel \
--maintainers=Retropikzel \
--license="${license}" \
--doc-from-scribble=1 \
--test=${testfile} \
--description="${description}" \
${library_file} ${additional_libraries}
git-index:
snow-chibi git-index ${pkg}
install:
snow-chibi install --impls=${SCHEME} --always-yes --verbose?=1 --skip-tests?=1 ${pkg}
test: package
snow-chibi --impls=${SCHEME} test-package ${pkg}
test-compile-r7rs:
COMPILE_R7RS=${SCHEME} compile-r7rs -o test-program ${testfile}
./test-program
test-docker:
DOCKER_TAG=${DOCKER_TAG} \
SNOW_PACKAGES="retropikzel.tap ${pkg}" \
COMPILE_R7RS=${SCHEME} \
test-r7rs -o test-program ${testfile}
retropikzel/wasm/plus.wat: retropikzel/wasm/plus.c
emcc -o retropikzel/wasm/plus.js retropikzel/wasm/plus.c
wasm-dis retropikzel/wasm/plus.wasm > retropikzel/wasm/plus.wat
jenkinsfile: makings.scm
makings --jenkinsfile > Jenkinsfile
clean:
git clean -X -f