构建 Buildapp
可以使用 buildapp
构建独立的 Common Lisp 二进制文件。在我们使用它来生成二进制文件之前,我们需要安装并构建它。
我知道如何使用 quicklisp
和 Common Lisp 这个最简单的方法 (这个例子使用了[sbcl
],但是它应该与你所拥有的不同)。
$ sbcl
This is SBCL 1.3.5.nixos, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (ql:quickload :buildapp)
To load "buildapp":
Load 1 ASDF system:
buildapp
; Loading "buildapp"
(:BUILDAPP)
* (buildapp:build-buildapp)
;; loading system "buildapp"
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into /home/inaimathi/buildapp:
writing 4800 bytes from the read-only space at 0x20000000
writing 3216 bytes from the static space at 0x20100000
writing 47349760 bytes from the dynamic space at 0x1000000000
done]
NIL
* (quit)
$ ls -lh buildapp
-rwxr-xr-x 1 inaimathi inaimathi 46M Aug 13 20:12 buildapp
$
一旦构建了二进制文件,就可以使用它来构建 Common Lisp 程序的二进制文件。如果你打算这么做,你也应该把它放在你的 PATH
上,这样你就可以从任何目录中使用 buildapp
运行它。