Skip to content

Commit

Permalink
add option to shutdown from makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
devyn committed Aug 16, 2023
1 parent 7afd8e9 commit 4d3ba93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stage1/words.s
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ INITIAL_WORDS:
.ascii "words$"
.balign 8

.quad shutdown
.byte 9
.byte LISP_OBJECT_TYPE_INTEGER
.ascii "shutdown$"
.balign 8

# end
.quad 0
.quad 0
Expand Down
3 changes: 3 additions & 0 deletions stage2/make.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
stage2.lsp: $(wildcard stage2/*.lsp)
# strip comments
sed -E '/^ *(;.*)?$$/d' $^ > stage2.lsp
if [[ "${SHUTDOWN}" == 1 ]]; then \
echo "(call-native shutdown$$ 0)" >> stage2.lsp \
fi

clean-stage2:
rm -f stage2.lsp
Expand Down

0 comments on commit 4d3ba93

Please sign in to comment.