From a417c9aec13dd81474373dc71cf50431c7dbbf4f Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sat, 29 Aug 2026 16:47:04 +0300 Subject: [PATCH] Bump version. Prepare for snow-indexing --- .gitignore | 1 + Makefile | 52 +++++++++++++---------------------- retropikzel/scsh/portable.scm | 10 ++++++- retropikzel/scsh/test.scm | 10 +++++++ retropikzel/system/VERSION | 2 +- retropikzel/system/test.scm | 8 ++++++ 6 files changed, 48 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 44e0ba1..5e907f8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ tmp test-program *.test *.test1 +!.snow-repo.scm diff --git a/Makefile b/Makefile index b8ae7d1..8759c9d 100644 --- a/Makefile +++ b/Makefile @@ -1,58 +1,44 @@ -.SILENT: +.DEFAULT: all +.POSIX: SCHEME=chibi -DOCKER_TAG=latest -RNRS=r7rs +VERSION=$$(cat retropikzel/${LIBRARY}/VERSION) +PKG=retropikzel-${LIBRARY}-${VERSION}.tgz LIBRARY=system AUTHOR=Retropikzel +DOCKER_TAG=latest -VERSION != cat retropikzel/${LIBRARY}/VERSION -PACKAGE_ARGS != cat retropikzel/${LIBRARY}/PACKAGE_ARGS 2> /dev/null || echo "" -CSC_OPTIONS != cat retropikzel/${LIBRARY}/CSC_OPTIONS 2> /dev/null || echo "" -APT_PACKAGES != cat retropikzel/${LIBRARY}/APT_PACKAGES 2> /dev/null || echo "" -LIBRARY_FILE=retropikzel/${LIBRARY}.sld -DESCRIPTION != head -n1 retropikzel/${LIBRARY}/README.md -README=retropikzel/${LIBRARY}/README.html +PACKAGE_ARGS=$$(cat retropikzel/${LIBRARY}/PACKAGE_ARGS 2> /dev/null || echo "") +CSC_OPTIONS=$$(cat retropikzel/${LIBRARY}/CSC_OPTIONS 2> /dev/null || echo "") +APT_PACKAGES=$$(cat retropikzel/${LIBRARY}/APT_PACKAGES 2> /dev/null || echo "") + TESTFILE=retropikzel/${LIBRARY}/test.scm -PKG=retropikzel-${LIBRARY}-${VERSION}.tgz - -ifeq "${SCHEME}" "capyscheme" -DOCKER_TAG=head -endif -ifeq "${SCHEME}" "chibi" -DOCKER_TAG=head -endif -ifeq "${SCHEME}" "chicken" -DOCKER_TAG=head -endif -ifeq "${SCHEME}" "gauche" -DOCKER_TAG=head -endif all: package package: retropikzel/${LIBRARY}/VERSION retropikzel/${LIBRARY}/README.md retropikzel/${LIBRARY}/LICENSE - echo "
$$(cat retropikzel/${LIBRARY}/README.md)
" > ${README} snow-chibi package \ --always-yes \ ${PACKAGE_ARGS} \ - --version=${VERSION} \ - --authors=${AUTHOR} \ - --doc=${README} \ - --description="${DESCRIPTION}" \ - ${LIBRARY_FILE} + --version="${VERSION}" \ + --authors="${AUTHOR}" \ + --doc="retropikzel/${LIBRARY}/README.md" \ + --test="retropikzel/${LIBRARY}/test.scm" \ + --description="$$(head -n1 retropikzel/${LIBRARY}/README.md)" \ + retropikzel/${LIBRARY}.sld -${PKG}: package +git-index: package + snow-chibi git-index ${PKG} install: - snow-chibi install --impls=${SCHEME} --always-yes ${PKG} + snow-chibi install --impls=${SCHEME} --skip-tests?=1 ${PKG} test: rm -rf test-program COMPILE_R7RS=${SCHEME} \ CSC_OPTIONS="${CSC_OPTIONS}" \ - compile-r7rs -o test-program ${TESTFILE} + compile-r7rs -o test-program ${TESTFILE} ./test-program test-docker: diff --git a/retropikzel/scsh/portable.scm b/retropikzel/scsh/portable.scm index a9fa426..0e2f3f4 100644 --- a/retropikzel/scsh/portable.scm +++ b/retropikzel/scsh/portable.scm @@ -495,7 +495,8 @@ (apply read-delimited (cons (string #\newline) args)))) -#| TODO +;; IN PROGRESS +#| (define read-paragraph (lambda args @@ -518,6 +519,13 @@ (cond ((and (eof-object? line) (null? result)) line) ((and (not skipped-blank-lines?) (string=? line "")) (looper (read-line port handle-delim))) + ((and (not (string=? line "")) + (equal handle-delim 'trim)) + (set! result line result)) + ((and (not (string=? line "")) + (equal handle-delim 'concat)) + (set! result (string-append line "\n") result)) + )) diff --git a/retropikzel/scsh/test.scm b/retropikzel/scsh/test.scm index bb2e314..8be6b60 100644 --- a/retropikzel/scsh/test.scm +++ b/retropikzel/scsh/test.scm @@ -523,4 +523,14 @@ (test-end "read-line") +#| IN PROGRESS +(test-begin "read-paragraph") +(test-equal "foo" (read-line (open-input-string "foo\n\nbar\n\nbaz\n\n"))) +(test-equal "foo" (read-line (open-input-string "foo\n\nbar\n\nbaz\n\n"))) +(test-equal "foo" (read-line (open-input-string "foo\n\nbar\n\nbaz\n\n") 'trim)) +(test-equal "foo\n" (read-line (open-input-string "foo\n\nbar\n\nbaz\n\n") 'concat)) +(test-end "read-paragraph") +|# + + (test-end "scsh") diff --git a/retropikzel/system/VERSION b/retropikzel/system/VERSION index e25d8d9..0664a8f 100644 --- a/retropikzel/system/VERSION +++ b/retropikzel/system/VERSION @@ -1 +1 @@ -1.1.5 +1.1.6 diff --git a/retropikzel/system/test.scm b/retropikzel/system/test.scm index c4da47a..0213a07 100644 --- a/retropikzel/system/test.scm +++ b/retropikzel/system/test.scm @@ -1,3 +1,11 @@ +(import (scheme base) + (scheme write) + (scheme file) + (retropikzel system) + (retropikzel tap) + (srfi 64)) + +(test-runner-current (tap-runner)) (test-begin "foreign-c-system")