make-hello-world.lisp 1.56 KB
Newer Older
1
;;; -*- Lisp -*-
2
#+lispworks (lispworks:load-all-patches)
3
(load (make-pathname :name "script-support" :defaults *load-pathname*))
4
(load-asdf)
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
5
#+(or clasp ecl mkcl) (require :cmp)
6

7
(asdf-test::register-directory asdf-test::*asdf-directory*) ;; we need UIOP, and ECL can dump.
8
9
10
11
(asdf-test::register-directory asdf-test::*uiop-directory*)
(asdf:upgrade-asdf) ;; may recompile and rename away package asdf?

(asdf-test::frob-packages)
12

13
14
15
16
17
(println "This is make-hello-world, testing its standard-output.") ; *standard-output*
(println "This is make-hello-world, testing its error-output." *error-output*)
(println "This is make-hello-world, testing its stdout." *stdout*)
(println "This is make-hello-world, testing its stderr." *stderr*)

18
19
20
21
#+mkcl
(defun add-mkcl-dll (pathname)
  ;; make sure mkcl-X.X.X.dll is the same directory as the executable
  (let* ((dll-orig (subpathname (si::self-truename)
Elias Pipping's avatar
Elias Pipping committed
22
                                (strcat #-os-windows "../lib/"
23
                                        "mkcl_" (si:mkcl-version)
24
                                        "." (asdf/bundle:bundle-pathname-type :shared-library))))
Elias Pipping's avatar
Elias Pipping committed
25
         (dll-dest (subpathname pathname (strcat #-os-windows "../lib/" (file-namestring dll-orig)))))
26
27
28
29
30
31
    (ensure-directories-exist dll-dest)
    (copy-file dll-orig dll-dest)))


(defun make-hello-bundle (operation)
  (operate operation :hello-world-example)
32
33
  #+mkcl (add-mkcl-dll (asdf::output-file operation :hello-world-example))
  (quit 0))
34
35
36

(defun make-hello-image ()
  (make-hello-bundle 'image-op))
37
38

(defun make-hello-program ()
39
  (make-hello-bundle 'program-op))