Skip to content
Snippets Groups Projects
Commit 0653be20 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Add a default-image feature

Use it for allegro variants on Windows.
Also, use the console application build.exe on Windows (or buildi.exe as
appropriate) so that it's possible to capture Lisp standard output,
at the expense of not being able to run multithreaded code.
parent 567ec111
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,12 @@ locations, you may simply specify the Allegro install directories using these va ...@@ -19,8 +19,12 @@ locations, you may simply specify the Allegro install directories using these va
"Return a list of possible Allegro variants based on built-in information "Return a list of possible Allegro variants based on built-in information
and environment variables. The returned list is made up of argument lists for and environment variables. The returned list is made up of argument lists for
REGISTER-LISP-IMPLEMENTATION." REGISTER-LISP-IMPLEMENTATION."
;; Beware that on Windows, we use the non-multithreaded console application build.exe
;; so that we may have console I/O on the existing stdin and stdout, that we may capture.
(while-collecting (c) (while-collecting (c)
(loop :for (smpvar smpname smpfullname) :in `(("" "" "") ("S" :_s " (SMP)")) :do (loop
:with windowsp = (os-windows-p)
:for (smpvar smpname smpfullname) :in `(("" "" "") ("S" :_s " (SMP)")) :do
(loop (loop
:for (bitsvar bitsname bitsfullname) :in '(("" "" "") ("64" "_64" " (64-bit words)")) :for (bitsvar bitsname bitsfullname) :in '(("" "" "") ("64" "_64" " (64-bit words)"))
:for dirvar = (format nil "~:@(ALLEGRO~A~A~)" bitsvar smpvar) :for dirvar = (format nil "~:@(ALLEGRO~A~A~)" bitsvar smpvar)
...@@ -33,9 +37,14 @@ REGISTER-LISP-IMPLEMENTATION." ...@@ -33,9 +37,14 @@ REGISTER-LISP-IMPLEMENTATION."
:for fullname = (strcat "Allegro CL" :for fullname = (strcat "Allegro CL"
casefullname charfullname bitsfullname smpfullname) casefullname charfullname bitsfullname smpfullname)
:for executable = (format nil "~(~alisp~a~)" caseexe charname) :do :for executable = (format nil "~(~alisp~a~)" caseexe charname) :do
:for (exepath imgpath) = (if windowsp
(list (subpathname dir (if (emptyp charfullname) "buildi.exe" "build.exe"))
(subpathname dir executable :type "dxl"))
(list (subpathname dir executable) nil))
(c `(,allegro-variant (c `(,allegro-variant
:fullname ,fullname :fullname ,fullname
:name ,(native-namestring (subpathname dir executable)) :name ,(native-namestring exepath)
:default-image ,(native-namestring imgpath)
:feature :allegro ;; do we want a more discriminating feature expression? :feature :allegro ;; do we want a more discriminating feature expression?
:flags ("-qq") :flags ("-qq")
:eval-flag "-e" :eval-flag "-e"
...@@ -46,10 +55,7 @@ REGISTER-LISP-IMPLEMENTATION." ...@@ -46,10 +55,7 @@ REGISTER-LISP-IMPLEMENTATION."
:image-executable-p nil :image-executable-p nil
:standalone-executable nil :standalone-executable nil
:argument-control t :argument-control t
:disable-debugger ("-batch" ; see also -#D -#C -#! :disable-debugger ("-batch") ; see also -#D -#C -#!
,@(when (and (os-windows-p)
(not (getenvp "ALLEGRO_NOISY")))
'("+c")))
:quit-format "(excl:exit ~A :quiet t)" :quit-format "(excl:exit ~A :quiet t)"
:dump-format "(progn (sys:resize-areas :global-gc t :pack-heap t :sift-old-areas t :tenure t) (excl:dumplisp :name ~A :suppress-allegro-cl-banner t))")))))))) :dump-format "(progn (sys:resize-areas :global-gc t :pack-heap t :sift-old-areas t :tenure t) (excl:dumplisp :name ~A :suppress-allegro-cl-banner t))"))))))))
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
(error "ASDF 3.1.2 required")) (error "ASDF 3.1.2 required"))
(defsystem "lisp-invocation" (defsystem "lisp-invocation"
:version "1.0.9" :version "1.0.10"
:author ("Francois-Rene Rideau") :author ("Francois-Rene Rideau")
:maintainer "Francois-Rene Rideau" :maintainer "Francois-Rene Rideau"
:licence "MIT" :licence "MIT"
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
arguments-end arguments-end
image-flag image-flag
image-executable-p image-executable-p
default-image
standalone-executable standalone-executable
argument-control argument-control
disable-debugger disable-debugger
...@@ -100,16 +101,17 @@ followed by a plist of keywords and arguments." ...@@ -100,16 +101,17 @@ followed by a plist of keywords and arguments."
(&key (implementation-type (implementation-type)) (&key (implementation-type (implementation-type))
lisp-path lisp-path
(lisp-flags :default) (lisp-flags :default)
image-path (image-path nil image-path-p)
load load
eval eval
arguments arguments
debugger debugger
cross-compile) cross-compile)
(with-slots (name flags disable-debugger load-flag eval-flag (with-slots (name flags disable-debugger load-flag eval-flag
image-flag image-executable-p standalone-executable image-flag default-image image-executable-p standalone-executable
arguments-end argument-control) arguments-end argument-control)
(get-lisp-implementation implementation-type) (get-lisp-implementation implementation-type)
(unless image-path-p (setf image-path default-image))
(append (append
(when (or (null image-path) (not image-executable-p)) (when (or (null image-path) (not image-executable-p))
(ensure-list (ensure-list
......
;; Composing command lines that don't use any special character.
(defpackage :lisp-invocation/non-special (defpackage :lisp-invocation/non-special
(:use :common-lisp :uiop) (:use :common-lisp :uiop)
(:export (:export
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment