Advertisement
Guest User

Untitled

a guest
Dec 7th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1.  
  2. [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --eval '(compile-file "/tmp/main.lisp")'
  3. ; compiling file "/private/tmp/main.lisp" (written 08 DEC 2018 01:11:11 AM):
  4. ; compiling file "/private/tmp/hello.lisp" (written 08 DEC 2018 01:10:27 AM):
  5. ; compiling (DEFPARAMETER HELLO ...)
  6.  
  7. ; /private/tmp/hello.fasl written
  8. ; compilation finished in 0:00:00.002
  9. ; compiling (LOAD (MERGE-PATHNAMES "hello" ...))
  10. ; compiling (FORMAT T ...)
  11. ; compiling (FINISH-OUTPUT)
  12.  
  13. ; /tmp/main.fasl written
  14. ; compilation finished in 0:00:00.007
  15. [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --eval '(compile-file "/tmp/hello.lisp")'
  16. ; compiling file "/private/tmp/hello.lisp" (written 08 DEC 2018 01:10:27 AM):
  17. ; compiling (DEFPARAMETER HELLO ...)
  18.  
  19. ; /tmp/hello.fasl written
  20. ; compilation finished in 0:00:00.002
  21. [pjb@despina org.macports:0 src]$ sbcl --noinform --non-interactive --no-userinit --load /tmp/main
  22. Hello World!
  23. [pjb@despina org.macports:0 src]$ cat /tmp/hello.lisp
  24. (defparameter hello "Hello World!")
  25. [pjb@despina org.macports:0 src]$ cat /tmp/main.lisp
  26.  
  27. (eval-when (:compile-toplevel)
  28. (load (compile-file (merge-pathnames "hello" *compile-file-truename*))))
  29.  
  30. (eval-when (:load-toplevel :execute)
  31. ;; Assume hello has already been compiled
  32. (load (merge-pathnames "hello" *load-truename*)))
  33.  
  34. (format t "~A~%" hello)
  35. (finish-output)
  36. [pjb@despina org.macports:0 src]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement