1 ;;; dump.lisp --- ECL demos dumping code
3 ;; Copyright (C) 2010, 2011, 2012 Didier Verna.
5 ;; Author: Didier Verna <didier@lrde.epita.fr>
6 ;; Maintainer: Didier Verna <didier@lrde.epita.fr>
8 ;; This file is part of Clon.
10 ;; Permission to use, copy, modify, and distribute this software for any
11 ;; purpose with or without fee is hereby granted, provided that the above
12 ;; copyright notice and this permission notice appear in all copies.
14 ;; THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 ;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 ;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 ;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 ;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 ;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 ;; Contents management by FCM version 0.1.
32 (defconstant +executable
+
33 (second (member "--" (si:command-args
) :test
#'string
=)))
34 (defconstant +source
+ (concatenate 'string
+executable
+ ".lisp"))
35 (defconstant +object
+ (concatenate 'string
+executable
+ ".o"))
37 (asdf:load-system
:com.dvlsoft.clon
)
39 (compile-file +source
+ :output-file
+object
+ :system-p t
)
41 ;; #### NOTE: this only dumps an executable without Clon in the image. Clon
42 ;; will still be loaded dynamically by ASDF every time the program is run.
43 (c:build-program
+executable
+ :lisp-files
(list +object
+))
47 ;;; dump.lisp ends here