Newer
Older
":" ; : "-*- Lisp -*-" \
; case "${1:-sbcl}" in (sbcl) sbcl --load test.lisp \
;; (allegro) alisp -L test.lisp \
;; (ccl) ../single-threaded-ccl/stccl --load test.lisp \
;; (clisp) clisp -i test.lisp \
;; (*) echo "Unrecognized/unsupported Lisp: $1" ; exit 42
Francois-Rene Rideau
committed
;; esac 2>&1 | tee foo ; exit
Francois-Rene Rideau
committed
Francois-Rene Rideau
committed
(setf *load-verbose* nil
*load-print* nil
*compile-verbose* nil
*compile-print* nil)
(ignore-errors (funcall 'require "asdf"))
#-asdf2 (load "../asdf/build/asdf.lisp")
(asdf:load-system :asdf)
(in-package :asdf) ;; in case there was a punt, be in the NEW asdf package.
Francois-Rene Rideau
committed
(pushnew :DBG *features*)
Francois-Rene Rideau
committed
(defmacro DBG (tag &rest exprs)
"simple debug statement macro:
outputs a tag plus a list of source expressions and their resulting values, returns the last values"
(let ((res (gensym))(f (gensym)))
`(let ((,res))
(flet ((,f (fmt &rest args) (apply #'format *trace-output* fmt args)))
(,f "~&~A~%" ,tag)
,@(mapcan
#'(lambda (x)
`((,f "~& ~S => " ',x)
(,f "~{~S~^ ~}~%" (setf ,res (multiple-value-list ,x)))))
exprs)
(apply 'values ,res)))))
(setf *load-verbose* t
*load-print* t
*compile-verbose* t
Francois-Rene Rideau
committed
*compile-print* t
*asdf-verbose* t)
Francois-Rene Rideau
committed
(trace
;; make-plan make-parallel-plan
perform-plan
Francois-Rene Rideau
committed
;; mark-as-done
;; process-return process-result ;; action-result-file
;; input-files output-files file-write-date
;; component-operation-time mark-operation-done
;; call-queue/forking posix-waitpid
Francois-Rene Rideau
committed
;; perform perform-with-restarts
;; compile-file load
;; operate call-recording-breadcrumbs
Francois-Rene Rideau
committed
)
;;#+allegro (trace posix-fork posix-wexitstatus posix-waitpid excl::getpid quit)
;;#+clisp (trace asdf::read-file-form asdf::read-file-forms)
Francois-Rene Rideau
committed
(defvar *fare* (asdf/common-lisp:user-homedir-pathname))
Francois-Rene Rideau
committed
(defun subnamestring (base sub)
(namestring (asdf/driver:subpathname base sub)))
Francois-Rene Rideau
committed
Francois-Rene Rideau
committed
(block nil
(handler-bind ((error #'(lambda (condition)
(format t "~&ERROR:~%~A~%" condition)
(print-backtrace :stream *standard-output*)
Francois-Rene Rideau
committed
(format t "~&ERROR:~%~A~%" condition)
(finish-output)
(return))))
Francois-Rene Rideau
committed
(asdf:parallel-load-system
:exscribe :verbose t
:force :all
Francois-Rene Rideau
committed
:breadcrumbs-to "/tmp/breadcrumbs.text")
(funcall (asdf/package:find-symbol* :process-command-line :exscribe)
Francois-Rene Rideau
committed
`("-I" ,(subnamestring *fare* "fare/www/")
"-o" "-" "-H" ,(subnamestring *fare* "fare/www/index.scr")))))
(format t "~&~S~%" (asdf/os:implementation-identifier))
Francois-Rene Rideau
committed
(format t "~&Compiled with as many as ~D forked subprocesses~%" *max-actual-forks*)