diff options
author | EuAndreh <eu@euandre.org> | 2022-10-19 23:40:40 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-10-19 23:40:44 -0300 |
commit | b5260d6af32ad0960b4bf974730934ca5c56d48b (patch) | |
tree | 65b65ad5c24be25d7c020f98422a0f20d0785eb3 | |
parent | bin/cl: Add first working version, integrated with Makefile and etc/sh/rc (diff) | |
download | dotfiles-b5260d6af32ad0960b4bf974730934ca5c56d48b.tar.gz dotfiles-b5260d6af32ad0960b4bf974730934ca5c56d48b.tar.xz |
Makefile: Include working Lisp image for SBCL
-rw-r--r-- | Makefile | 12 | ||||
-rwxr-xr-x | bin/cl | 16 |
2 files changed, 17 insertions, 11 deletions
@@ -5,12 +5,16 @@ pod2man = \ share/man/man1/z.1 \ +lisp-images = \ + $(XDG_DATA_HOME)/lisp-cli/clisp.image \ + $(XDG_DATA_HOME)/lisp-cli/sbcl.image \ + derived-assets = \ $(pod2man) \ $(XDG_CONFIG_HOME)/ssh/id_rsa.pub \ $(XDG_DATA_HOME)/common-lisp/source \ $(XDG_DATA_HOME)/euandreh/e.list.txt \ - $(XDG_DATA_HOME)/lisp-cli/clisp.image \ + $(lisp-images) @@ -30,9 +34,9 @@ $(XDG_CONFIG_HOME)/ssh/id_rsa.pub: $(XDG_DATA_HOME)/euandreh/e.list.txt: ~/Documents/txt/ opt/aux/gen-e-list.sh sh opt/aux/gen-e-list.sh > $@ -$(XDG_DATA_HOME)/lisp-cli/clisp.image: $(XDG_CONFIG_HOME)/lisp-cli/init.lisp bin/cl - cl \ - -I clisp \ +$(lisp-images): $(XDG_CONFIG_HOME)/lisp-cli/init.lisp bin/cl + I=`echo $@ | awk -F/ '$$0=$$(NF)' | cut -d. -f1` && cl \ + -I $$I \ -v \ -e '(ql:quickload :trivial-dump-core)' \ -e '(trivial-dump-core:dump-image "$@")' \ @@ -198,7 +198,7 @@ else :print NIL) (uiop:quit 0)) (error (e) - (format *error-output* "~&~%ERROR: ~a" e) + (format *error-output* "~&~%error: ~a~%" e) (uiop:quit 1))) EOF fi @@ -263,17 +263,19 @@ case "$IMPL" in exit 4 ;; sbcl) - ARGS="--disable-debugger --script $MAIN" - if [ "$VERBOSE" = false ]; then - ARGS="$ARGS --noinform" + ARGS="--load $MAIN" + if [ -n "$IMAGE" ]; then + set -- --core "$IMAGE" fi if [ "$NO_RC" = true ]; then ARGS="$ARGS --no-sysinit --no-userinit" fi - if [ -n "$IMAGE" ]; then - set -- --core "$IMAGE" + if [ "$VERBOSE" = false ]; then + ARGS="--noinform $ARGS" + else + set -x fi - exec sbcl $ARGS "$@" + exec sbcl "$@" $ARGS ;; *) printf 'Unsupported implementation: "%s".\n\n' "$IMPL" >&2 |