Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --eval '(compile-file "/tmp/main.lisp")'
- ; compiling file "/private/tmp/main.lisp" (written 08 DEC 2018 01:11:11 AM):
- ; compiling file "/private/tmp/hello.lisp" (written 08 DEC 2018 01:10:27 AM):
- ; compiling (DEFPARAMETER HELLO ...)
- ; /private/tmp/hello.fasl written
- ; compilation finished in 0:00:00.002
- ; compiling (LOAD (MERGE-PATHNAMES "hello" ...))
- ; compiling (FORMAT T ...)
- ; compiling (FINISH-OUTPUT)
- ; /tmp/main.fasl written
- ; compilation finished in 0:00:00.007
- [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --eval '(compile-file "/tmp/hello.lisp")'
- ; compiling file "/private/tmp/hello.lisp" (written 08 DEC 2018 01:10:27 AM):
- ; compiling (DEFPARAMETER HELLO ...)
- ; /tmp/hello.fasl written
- ; compilation finished in 0:00:00.002
- [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --load /tmp/main
- Hello World!
- [pjb@despina org.macports:0 src]$ cat /tmp/hello.lisp
- (defparameter hello "Hello World!")
- [pjb@despina org.macports:0 src]$ cat /tmp/main.lisp
- (eval-when (:compile-toplevel)
- (load (compile-file (merge-pathnames "hello" *compile-file-truename*))))
- (eval-when (:load-toplevel :execute)
- ;; Assume hello has already been compiled
- (load (merge-pathnames "hello" *load-truename*)))
- (format t "~A~%" hello)
- (finish-output)
- [pjb@despina org.macports:0 src]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement